@layer reset,tokens,typography,themes,glass,components,utilities,pages;
/**
 * ██████╗ ██████╗ ███████╗██╗   ██╗███████╗    ██╗   ██╗██████╗
 * ██╔════╝██╔═══██╗██╔════╝██║   ██║██╔════╝    ██║   ██║╚════██╗
 * ██║     ██║   ██║█████╗  ██║   ██║███████╗    ██║   ██║ █████╔╝
 * ██║     ██║   ██║██╔══╝  ██║   ██║╚════██║    ╚██╗ ██╔╝██╔═══╝
 * ╚██████╗╚██████╔╝███████╗╚██████╔╝███████║     ╚████╔╝ ███████╗
 *  ╚═════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚══════╝      ╚═══╝  ╚══════╝
 *
 * COEUS DESIGN SYSTEM V2.0 - CONSOLIDATED MASTER CSS
 * Data-driven consolidation reducing 150+ classes to 60 core classes
 *
 * VERSION: 2.0.0
 * CREATED: 2025-11-17
 * PURPOSE: Consolidated, performant CSS architecture
 *
 * IMPROVEMENTS OVER V1:
 * - 60% fewer CSS classes (150+ → 60)
 * - 65% smaller file size (470KB → 180KB)
 * - Container-aware automatic scaling
 * - 5 complete theme definitions
 * - Noto JP/KR fonts for CJK support
 * - Semantic class naming
 *
 * ARCHITECTURE:
 * 1. Reset         - Browser normalization
 * 2. Variables     - Design tokens
 * 3. Typography    - 6 consolidated classes
 * 4. Themes        - 5 complete themes
 * 5. Glass System  - Depth-aware glassmorphism
 * 6. Container     - Depth-aware scaling
 * 7. Backgrounds   - Theme background images
 * 8. Components    - Reusable UI components
 * 9. Utilities     - Single-purpose helpers
 * 10. Pages        - Page-specific overrides
 *
 * USAGE:
 * Replace coeus-master.css with this file:
 * <link rel="stylesheet" href="css/coeus-v2.css">
 */

/* ============================================ */
/*              0. CASCADE LAYERS               */
/*   Establish layer priority order             */
/*   Later layers have higher specificity       */
/* ============================================ */
@layer reset, tokens, typography, themes, glass, components, utilities, pages;

/* ============================================ */
/*              1. FONT LOADING                 */
/*   Load fonts first for faster rendering     */
/* ============================================ */
/* Bodoni Moda for COEUS logo only, Noto JP/KR for all other text */
/* Self-hosted fonts — eliminates Google Fonts DNS lookups + external CSS requests */
/**
 * @file fonts.css
 * @description Self-hosted Google Fonts (latin + latin-ext subsets only)
 * Font families: Bodoni Moda, Inter, Meddon, Noto Sans, Noto Sans JP/KR,
 *   Noto Serif, Noto Serif JP/KR
 * CJK characters fall back to system fonts.
 */

/* latin-ext */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url(/fonts/aFTS7PxzY382XsXX63LUYJSPeKTcW3JNsapGZQ.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url(/fonts/aFTS7PxzY382XsXX63LUYJSPeKrcW3JNsao.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/fonts/aFTQ7PxzY382XsXX63LUYJSESKjWXFBPgas.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/fonts/aFTQ7PxzY382XsXX63LUYJSKSKjWXFBP.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7W0Q5n-wU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7W0Q5n-wU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7W0Q5n-wU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7W0Q5n-wU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Meddon';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/kmK8ZqA2EgDNeHTpjR1A_SzQot1K.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Meddon';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/kmK8ZqA2EgDNeHTpgx1A_SzQog.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/o-0ZIpQlx3QUlC5A4PNr4C5OaxRsfNNlKbCePevtt3OmHS91ixg0.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/o-0ZIpQlx3QUlC5A4PNr4C5OaxRsfNNlKbCePevtuXOmHS91iw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/o-0bIpQlx3QUlC5A4PNB6Ryti20_6n1iPHjc5aDdu3mhPy1Fig.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/o-0bIpQlx3QUlC5A4PNB6Ryti20_6n1iPHjc5a7du3mhPy0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/-F62fjtqLzI2JPCgQBnw7HFYzwgP-FVth9IU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/-F62fjtqLzI2JPCgQBnw7HFYwQgP-FVthw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/-F62fjtqLzI2JPCgQBnw7HFYzwgP-FVth9IU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/-F62fjtqLzI2JPCgQBnw7HFYwQgP-FVthw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/-F62fjtqLzI2JPCgQBnw7HFYzwgP-FVth9IU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/-F62fjtqLzI2JPCgQBnw7HFYwQgP-FVthw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/-F62fjtqLzI2JPCgQBnw7HFYzwgP-FVth9IU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/-F62fjtqLzI2JPCgQBnw7HFYwQgP-FVthw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/PbykFmXiEBPT4ITbgNA5CgmG337twpAcuV8y.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/PbykFmXiEBPT4ITbgNA5CgmG0X7twpAcuQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/PbykFmXiEBPT4ITbgNA5CgmG337twpAcuV8y.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/PbykFmXiEBPT4ITbgNA5CgmG0X7twpAcuQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/PbykFmXiEBPT4ITbgNA5CgmG337twpAcuV8y.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/PbykFmXiEBPT4ITbgNA5CgmG0X7twpAcuQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/PbykFmXiEBPT4ITbgNA5CgmG337twpAcuV8y.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/PbykFmXiEBPT4ITbgNA5CgmG0X7twpAcuQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Serif';
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/ga6faw1J5X9T9RW6j9bNfFIMZhhWnFTyNZIQD1-_P3Hct_NFiQhhYQ.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Serif';
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/ga6faw1J5X9T9RW6j9bNfFIMZhhWnFTyNZIQD1-_P3_ct_NFiQg.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Serif';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/ga6daw1J5X9T9RW6j9bNVls-hfgvz8JcMofYTYf0D33WsNFHuQk.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Serif';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/ga6daw1J5X9T9RW6j9bNVls-hfgvz8JcMofYTYf6D33WsNFH.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Serif JP';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/xn7mYHs72GKoTvER4Gn3b5eMbNeuY2Q3X8_92A.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Serif JP';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/xn7mYHs72GKoTvER4Gn3b5eMbNmuY2Q3X88.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Serif JP';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/xn7mYHs72GKoTvER4Gn3b5eMbNeuY2Q3X8_92A.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Serif JP';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/xn7mYHs72GKoTvER4Gn3b5eMbNmuY2Q3X88.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Serif JP';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/xn7mYHs72GKoTvER4Gn3b5eMbNeuY2Q3X8_92A.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Serif JP';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/xn7mYHs72GKoTvER4Gn3b5eMbNmuY2Q3X88.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Serif JP';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/xn7mYHs72GKoTvER4Gn3b5eMbNeuY2Q3X8_92A.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Serif JP';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/xn7mYHs72GKoTvER4Gn3b5eMbNmuY2Q3X88.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Serif KR';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/3Jn7SDn90Gmq2mr3blnHaTZXRulj1cFxOHVjnA.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Serif KR';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/3Jn7SDn90Gmq2mr3blnHaTZXRudj1cFxOHU.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Serif KR';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/3Jn7SDn90Gmq2mr3blnHaTZXRulj1cFxOHVjnA.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Serif KR';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/3Jn7SDn90Gmq2mr3blnHaTZXRudj1cFxOHU.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Noto Serif KR';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/3Jn7SDn90Gmq2mr3blnHaTZXRulj1cFxOHVjnA.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Noto Serif KR';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/3Jn7SDn90Gmq2mr3blnHaTZXRudj1cFxOHU.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================ */
/*              2. CSS RESET                    */
/*   Consistent baseline across browsers       */
/* ============================================ */
/**
 * COEUS Design System - CSS Reset
 *
 * PURPOSE:
 * Provides a consistent baseline across all browsers by resetting default styles
 *
 * DEPENDENCIES: None (standalone)
 * LAST UPDATED: 2025-10-26
 */

/* Box sizing rules */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margin and padding */
* {
    margin: 0;
    padding: 0;
}

/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Set core root defaults */
html:focus-within {
    scroll-behavior: smooth;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ============================================ */
/*              3. DESIGN TOKENS                */
/*   Variables, themes, backgrounds — single    */
/*   source of truth (replaces variables-v2,    */
/*   themes-v2, backgrounds.css)                */
/* ============================================ */
/**
 * COEUS DESIGN SYSTEM — DESIGN TOKENS
 * Single source of truth for all design variables.
 *
 * REPLACES: variables-v2.css, themes-v2.css, backgrounds.css
 *
 * SECTIONS:
 *   1. Universal tokens (theme-independent)
 *   2. Theme definitions (3 color groups, 5 themes)
 *   3. Body/background setup
 *   4. Theme transitions & utilities
 *
 * VERSION: 3.1.0
 * CREATED: 2026-03-03
 * UPDATED: 2026-03-13 — removed 18 unreferenced tokens (breakpoints, sidebar/modal/content widths, grid, font aliases)
 */

/* ============================================ */
/*    TRANSITION KILLER (theme-manager.js)      */
/* ============================================ */
/* Applied briefly when --font-scale changes so 120+ "transition: all"
   rules don't animate every font-size simultaneously. */
.no-transitions,
.no-transitions *,
.no-transitions *::before,
.no-transitions *::after {
  transition-duration: 0s !important;
  animation-duration: 0s !important;
}

/* ============================================ */
/*    SECTION 1 — UNIVERSAL TOKENS              */
/* ============================================ */
:root {
  /* ---- FONTS ---- */
  --font-logo:     'Bodoni Moda', 'Noto Serif JP', Georgia, serif;
  --font-sans:     'Noto Sans JP', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:    'Noto Serif JP', 'Noto Serif KR', Georgia, 'Times New Roman', serif;

  --font-normal:   400;
  --font-medium:   500;
  --font-semibold: 600;
  --font-bold:     700;

  /* Controlled by theme-manager.js: S=0.875, M=1, L=1.125, XL=1.25 */
  --font-scale: 1;

  /* ---- SPACING (numeric scale, em-based) ---- */
  --spacing-0:  0;
  --spacing-1:  0.25em;   /*  4px */
  --spacing-2:  0.5em;    /*  8px */
  --spacing-3:  0.75em;   /* 12px */
  --spacing-4:  1em;      /* 16px */
  --spacing-5:  1.25em;   /* 20px */
  --spacing-6:  1.5em;    /* 24px */
  --spacing-7:  1.75em;   /* 28px */
  --spacing-8:  2em;      /* 32px */
  --spacing-10: 2.5em;    /* 40px */
  --spacing-12: 3em;      /* 48px */
  --spacing-16: 4em;      /* 64px */
  --spacing-20: 5em;      /* 80px */
  --spacing-24: 6em;      /* 96px */

  /* Legacy aliases (active during V1→V2 migration) */
  --spacing-xs:  var(--spacing-1);
  --spacing-sm:  var(--spacing-2);
  --spacing-md:  var(--spacing-4);
  --spacing-lg:  var(--spacing-6);
  --spacing-xl:  var(--spacing-8);
  --spacing-2xl: var(--spacing-12);
  --spacing-3xl: var(--spacing-16);

  /* ---- BORDER RADIUS ---- */
  --radius-sm:   0.5em;   /*  8px */
  --radius-md:   1em;     /* 16px */
  --radius-lg:   1.5em;   /* 24px */
  --radius-full: 9999px;

  /* ---- SHADOWS ---- */
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md:  0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg:  0 8px 16px rgba(0, 0, 0, 0.15);
  --shadow-xl:  0 8px 32px rgba(0, 0, 0, 0.2);

  /* ---- TRANSITIONS ---- */
  --transition-fast:   0.15s ease;
  --transition-base:   0.3s ease;
  --transition-slow:   0.5s ease;
  --transition-smooth: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* ---- Z-INDEX ---- */
  --z-dropdown:       10;
  --z-sticky:         20;
  --z-fixed:          30;
  --z-modal-backdrop: 40;
  --z-modal:          50;
  --z-popover:        60;
  --z-toast:          70;
  --z-tooltip:        80;

  /* ---- ACCENT COLORS (unified across ALL themes) ---- */
  --accent-primary:     #FF9500;
  --accent-success:     #34C759;
  --accent-warning:     #FFCC00;
  --accent-danger:      #FF3B30;

  --accent-primary-rgb: 255, 149, 0;
  --accent-success-rgb: 52, 199, 89;
  --accent-warning-rgb: 255, 204, 0;
  --accent-danger-rgb:  255, 59, 48;

  /* ---- iOS SYSTEM COLORS (constant) ---- */
  --ios-system-blue:   #007AFF;
  --ios-system-green:  #34C759;
  --ios-system-orange: #FF9500;
  --ios-system-red:    #FF3B30;
  --ios-system-purple: #AF52DE;
  --ios-system-teal:   #5AC8FA;
  --ios-system-yellow: #FFCC00;
  --ios-system-indigo: #5856D6;
  --ios-system-pink:   #FF2D92;

  /* RGB decompositions for rgba() */
  --ios-blue-rgb:   0, 122, 255;
  --ios-green-rgb:  52, 199, 89;
  --ios-orange-rgb: 255, 149, 0;
  --ios-red-rgb:    255, 59, 48;

  /* Button text on colored backgrounds */
  --button-text-on-color: #ffffff;

  /* ---- CONTAINER WIDTHS ---- */
  --container-sm:  40em;   /*  640px */
  --container-md:  48em;   /*  768px */
  --container-lg:  64em;   /* 1024px */
  --container-xl:  80em;   /* 1280px */
  --container-2xl: 96em;   /* 1536px */

  /* ---- TOUCH TARGETS ---- */
  --touch-target-min: 2.75em;  /* 44px — WCAG minimum */
}

/* ============================================ */
/*    SECTION 2 — THEME DEFINITIONS             */
/* ============================================ */

/* -------------------------------------------- */
/*  LIGHT GROUP — light + lightmodern           */
/*  Text base: Charcoal Blue (44, 62, 80)       */
/* -------------------------------------------- */

[data-theme="light"],
[data-theme="lightmodern"] {
  color-scheme: light;

  /* Text */
  --text-primary:       rgba(44, 62, 80, 0.95);
  --text-secondary:     rgba(44, 62, 80, 0.75);
  --text-tertiary:      rgba(44, 62, 80, 0.55);
  --text-quaternary:    rgba(44, 62, 80, 0.35);

  /* Glass */
  --glass-primary:      rgba(255, 255, 255, 0.12);
  --glass-secondary:    rgba(255, 255, 255, 0.08);
  --glass-border:       rgba(44, 62, 80, 0.15);
  --glass-border-hover: rgba(44, 62, 80, 0.30);
  --glass-hover:        rgba(44, 62, 80, 0.22);
  --theme-glass-rgb:    255, 255, 255;

  /* Inputs (lighter than containers) */
  --input-bg:           rgba(255, 255, 255, 0.70);
  --input-bg-hover:     rgba(255, 255, 255, 0.80);
  --input-bg-focus:     rgba(255, 255, 255, 0.90);
  --input-bg-solid:     #f0ebe6;
  --input-border:       rgba(44, 62, 80, 0.20);
  --input-border-hover: rgba(44, 62, 80, 0.30);
  --input-border-focus: var(--accent-primary);
  --input-text:         var(--text-primary);
  --input-placeholder:  var(--text-tertiary);

  /* Modal-context glass (high opacity for readability over dark overlays) */
  --glass-modal-bg: rgba(255, 255, 255, 0.82);

  /* Solid backgrounds */
  --background-primary:   #ffffff;
  --background-secondary: #f9fafb;
  --background-hover:     #f3f4f6;

  /* Borders */
  --border-color: rgba(44, 62, 80, 0.12);
  --border-hover: rgba(44, 62, 80, 0.25);
}

/* Per-theme blur + background overrides */
[data-theme="light"] {
  --glass-blur: blur(2px);
}

[data-theme="lightmodern"] {
  --glass-blur: blur(16px);
  --glass-primary:      rgba(255, 255, 255, 0.55);
  --glass-secondary:    rgba(255, 255, 255, 0.35);
  --glass-hover:        rgba(255, 255, 255, 0.45);
  --glass-modal-bg:     rgba(255, 255, 255, 0.88);
  --input-bg-solid: #f2eff0;
}

/* Background images */
[data-theme="light"] body::before,
body[data-theme="light"]::before {
  background-image: url('/assets/light.jpg');
}

[data-theme="lightmodern"] body::before,
body[data-theme="lightmodern"]::before {
  background-image: url('/assets/lightmodern.jpg');
}

/* -------------------------------------------- */
/*  DARK GROUP — dark + darkart                 */
/*  Text base: Warm Cream (245, 241, 232)       */
/* -------------------------------------------- */

[data-theme="dark"],
[data-theme="darkart"] {
  color-scheme: dark;

  /* Text */
  --text-primary:       rgba(245, 241, 232, 0.95);
  --text-secondary:     rgba(245, 241, 232, 0.85);
  --text-tertiary:      rgba(245, 241, 232, 0.65);
  --text-quaternary:    rgba(245, 241, 232, 0.45);

  /* Glass */
  --glass-primary:      rgba(0, 0, 0, 0.14);
  --glass-secondary:    rgba(0, 0, 0, 0.08);
  --glass-border:       rgba(245, 241, 232, 0.18);
  --glass-border-hover: rgba(245, 241, 232, 0.35);
  --glass-hover:        rgba(245, 241, 232, 0.22);
  --theme-glass-rgb:    0, 0, 0;

  /* Inputs (darker than containers) */
  --input-bg:           rgba(0, 0, 0, 0.35);
  --input-bg-hover:     rgba(0, 0, 0, 0.40);
  --input-bg-focus:     rgba(0, 0, 0, 0.45);
  --input-bg-solid:     #141418;
  --input-border:       rgba(245, 241, 232, 0.15);
  --input-border-hover: rgba(245, 241, 232, 0.25);
  --input-border-focus: var(--accent-primary);
  --input-text:         var(--text-primary);
  --input-placeholder:  var(--text-tertiary);

  /* Modal-context glass */
  --glass-modal-bg: rgba(0, 0, 0, 0.78);

  /* Solid backgrounds */
  --background-primary:   rgba(30, 30, 35, 0.85);
  --background-secondary: rgba(20, 20, 25, 0.75);
  --background-hover:     rgba(50, 50, 55, 0.85);

  /* Borders */
  --border-color: rgba(255, 255, 255, 0.15);
  --border-hover: rgba(255, 255, 255, 0.25);
}

/* Per-theme blur + background overrides */
[data-theme="dark"] {
  --glass-blur: blur(7px);
}

[data-theme="darkart"] {
  --glass-blur: blur(10px);
  --theme-glass-rgb: 20, 20, 30;
  --input-bg:       rgba(15, 15, 20, 0.50);
  --input-bg-hover: rgba(15, 15, 20, 0.55);
  --input-bg-focus: rgba(15, 15, 20, 0.60);
  --input-bg-solid: #171719;
}

/* Background images */
[data-theme="dark"] body::before,
body[data-theme="dark"]::before {
  background-image: url('/assets/dark.jpg');
  background-position: center center;
}

[data-theme="darkart"] body::before,
body[data-theme="darkart"]::before {
  background-image: url('/assets/darkart.jpg');
  background-position: center center;
}

/* -------------------------------------------- */
/*  DARK MODERN — unique color group            */
/*  Text base: Cool White (248, 250, 252)       */
/* -------------------------------------------- */

[data-theme="darkmodern"] {
  color-scheme: dark;

  /* Text */
  --text-primary:       rgba(248, 250, 252, 0.95);
  --text-secondary:     rgba(248, 250, 252, 0.85);
  --text-tertiary:      rgba(248, 250, 252, 0.65);
  --text-quaternary:    rgba(248, 250, 252, 0.45);

  /* Glass (blue-tinted, higher opacity) */
  --glass-primary:      rgba(15, 20, 30, 0.65);
  --glass-secondary:    rgba(15, 20, 30, 0.45);
  --glass-border:       rgba(248, 250, 252, 0.12);
  --glass-border-hover: rgba(248, 250, 252, 0.18);
  --glass-hover:        rgba(25, 30, 40, 0.72);
  --theme-glass-rgb:    15, 20, 30;

  /* Inputs */
  --input-bg:           rgba(5, 8, 15, 0.70);
  --input-bg-hover:     rgba(5, 8, 15, 0.75);
  --input-bg-focus:     rgba(5, 8, 15, 0.80);
  --input-bg-solid:     #080b14;
  --input-border:       rgba(248, 250, 252, 0.12);
  --input-border-hover: rgba(248, 250, 252, 0.20);
  --input-border-focus: var(--accent-primary);
  --input-text:         var(--text-primary);
  --input-placeholder:  var(--text-tertiary);

  /* Solid backgrounds */
  --background-primary:   rgba(12, 16, 28, 0.92);
  --background-secondary: rgba(8, 12, 22, 0.88);
  --background-hover:     rgba(18, 24, 38, 0.90);

  /* Borders */
  --border-color: rgba(248, 250, 252, 0.12);
  --border-hover: rgba(248, 250, 252, 0.22);

  /* Modal-context glass */
  --glass-modal-bg: rgba(15, 20, 30, 0.85);

  /* Blur */
  --glass-blur: blur(12px);
}

/* Background image */
[data-theme="darkmodern"] body::before,
body[data-theme="darkmodern"]::before {
  background-image: url('/assets/darkmodern.jpg');
  background-position: center center;
}

/* ============================================ */
/*    SECTION 3 — BODY / BACKGROUND SETUP       */
/* ============================================ */

/* Prevent horizontal overscroll bounce */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
}

/* Background image layer */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================ */
/*    SECTION 4 — THEME TRANSITIONS & UTILS     */
/* ============================================ */

/* Smooth theme switching */
* {
  transition:
    color 0.3s ease,
    background-color 0.3s ease,
    border-color 0.3s ease;
}

/* Prevent transition on initial page load */
body.no-transition * {
  transition: none !important;
}

/* Force text colors */
.text-primary    { color: var(--text-primary) !important; }
.text-secondary  { color: var(--text-secondary) !important; }
.text-tertiary   { color: var(--text-tertiary) !important; }
.text-quaternary { color: var(--text-quaternary) !important; }

/* Force backgrounds */
.bg-primary   { background: var(--background-primary) !important; }
.bg-secondary { background: var(--background-secondary) !important; }

/* Theme debug indicator (hidden by default) */
body[data-theme]::after {
  content: attr(data-theme);
  position: fixed;
  bottom: 10px;
  right: 10px;
  background: var(--glass-primary);
  color: var(--text-secondary);
  padding: 0.25em 0.5em;
  border-radius: 0.25em;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
}

body[data-theme].debug-theme::after {
  opacity: 0.7;
}


/* ============================================ */
/*              4. TYPOGRAPHY SYSTEM            */
/*   8 consolidated typography levels           */
/* ============================================ */
/**
 * COEUS DESIGN SYSTEM — TYPOGRAPHY (8 levels)
 *
 * HEADING SCALE (fluid, serif for H1-H4, sans for H5):
 *   ios-large-title  H1  40→64px  serif   bold(700)
 *   ios-title1       H2  36→48px  serif   semibold(600)
 *   ios-title2       H3  32→40px  serif   semibold(600)
 *   ios-title3       H4  24→32px  serif   semibold(600)
 *   ios-headline     H5  20→24px  sans    semibold(600)
 *
 * BODY SCALE (fixed, sans):
 *   ios-body         Body   16px  sans    normal(400)
 *   ios-callout      Label  14px  sans    medium(500)
 *   ios-caption1     Small  12px  sans    normal(400)
 *   ios-footnote     Tiny   10px  sans    normal(400)
 *
 * REMOVED (migrated):
 *   ios-subheadline → ios-headline
 *   ios-caption2    → ios-caption1
 *   ios-caption3    → ios-footnote
 *   heading-1/2/3   → ios-large-title/title1/title2
 *   body-text       → ios-body
 *   caption         → ios-caption1
 *   helper-text     → ios-footnote
 *   form-label      → ios-callout
 *
 * VERSION: 3.0.0
 * CREATED: 2026-03-03
 */

/* ============================================ */
/*    ROOT FONT SETUP                           */
/* ============================================ */

:root {
  --base-font-size: calc(16px * var(--font-scale, 1));
}

html {
  font-size: var(--base-font-size);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ============================================ */
/*    HEADING SCALE (fluid)                     */
/* ============================================ */

/* H1 — Large Title: 40px → 64px */
.ios-large-title {
  font-family: var(--font-serif);
  font-size: clamp(
    calc(2.5rem * var(--font-scale, 1)),
    calc(2.5rem * var(--font-scale, 1) + 1.5vw),
    calc(4rem * var(--font-scale, 1))
  );
  font-weight: var(--font-bold);
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* H2 — Title 1: 36px → 48px */
.ios-title1 {
  font-family: var(--font-serif);
  font-size: clamp(
    calc(2.25rem * var(--font-scale, 1)),
    calc(2.25rem * var(--font-scale, 1) + 0.75vw),
    calc(3rem * var(--font-scale, 1))
  );
  font-weight: var(--font-semibold);
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

/* H3 — Title 2: 32px → 40px */
.ios-title2 {
  font-family: var(--font-serif);
  font-size: clamp(
    calc(2rem * var(--font-scale, 1)),
    calc(2rem * var(--font-scale, 1) + 0.5vw),
    calc(2.5rem * var(--font-scale, 1))
  );
  font-weight: var(--font-semibold);
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* H4 — Title 3: 24px → 32px */
.ios-title3 {
  font-family: var(--font-serif);
  font-size: clamp(
    calc(1.5rem * var(--font-scale, 1)),
    calc(1.5rem * var(--font-scale, 1) + 0.5vw),
    calc(2rem * var(--font-scale, 1))
  );
  font-weight: var(--font-semibold);
  line-height: 1.25;
  color: var(--text-primary);
}

/* H5 — Headline: 20px → 24px */
.ios-headline {
  font-family: var(--font-sans);
  font-size: clamp(
    calc(1.25rem * var(--font-scale, 1)),
    calc(1.25rem * var(--font-scale, 1) + 0.25vw),
    calc(1.5rem * var(--font-scale, 1))
  );
  font-weight: var(--font-semibold);
  line-height: 1.3;
  color: var(--text-primary);
}

/* ============================================ */
/*    BODY SCALE (fixed)                        */
/* ============================================ */

/* Body default */
body {
  font-family: var(--font-sans);
  font-size: calc(1rem * var(--font-scale, 1));
  font-weight: var(--font-normal);
  line-height: 1.5;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

/* Body — 16px */
.ios-body {
  font-family: var(--font-sans);
  font-size: calc(1rem * var(--font-scale, 1));
  font-weight: var(--font-normal);
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Callout / Label — 14px */
.ios-callout {
  font-family: var(--font-sans);
  font-size: calc(0.875rem * var(--font-scale, 1));
  font-weight: var(--font-medium);
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Caption — 12px */
.ios-caption1 {
  font-family: var(--font-sans);
  font-size: calc(0.75rem * var(--font-scale, 1));
  font-weight: var(--font-normal);
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Footnote — 10px */
.ios-footnote {
  font-family: var(--font-sans);
  font-size: calc(0.625rem * var(--font-scale, 1));
  font-weight: var(--font-normal);
  line-height: 1.4;
  color: var(--text-tertiary);
}

/* ============================================ */
/*    BACKWARDS COMPATIBILITY ALIASES           */
/*    (will be removed after migration)         */
/* ============================================ */

/* heading-* → ios-* */
.heading-1 {
  font-family: var(--font-serif);
  font-size: clamp(
    calc(2.5rem * var(--font-scale, 1)),
    calc(2.5rem * var(--font-scale, 1) + 1.5vw),
    calc(4rem * var(--font-scale, 1))
  );
  font-weight: var(--font-bold);
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.heading-2 {
  font-family: var(--font-serif);
  font-size: clamp(
    calc(2.25rem * var(--font-scale, 1)),
    calc(2.25rem * var(--font-scale, 1) + 0.75vw),
    calc(3rem * var(--font-scale, 1))
  );
  font-weight: var(--font-semibold);
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.heading-3 {
  font-family: var(--font-serif);
  font-size: clamp(
    calc(2rem * var(--font-scale, 1)),
    calc(2rem * var(--font-scale, 1) + 0.5vw),
    calc(2.5rem * var(--font-scale, 1))
  );
  font-weight: var(--font-semibold);
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* ios-subheadline → ios-headline (alias) */
.ios-subheadline {
  font-family: var(--font-sans);
  font-size: clamp(
    calc(1.25rem * var(--font-scale, 1)),
    calc(1.25rem * var(--font-scale, 1) + 0.25vw),
    calc(1.5rem * var(--font-scale, 1))
  );
  font-weight: var(--font-medium);
  line-height: 1.3;
  color: var(--text-primary);
}

/* body-text → ios-body (alias) */
.body-text {
  font-family: var(--font-sans);
  font-size: calc(1rem * var(--font-scale, 1));
  font-weight: var(--font-normal);
  line-height: 1.5;
  color: var(--text-secondary);
}

/* form-label → ios-callout (alias with display:block) */
.form-label {
  font-family: var(--font-sans);
  font-size: calc(0.875rem * var(--font-scale, 1));
  font-weight: var(--font-medium);
  line-height: 1.4;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25em;
}

/* caption → ios-caption1 (alias) */
.caption {
  font-family: var(--font-sans);
  font-size: calc(0.75rem * var(--font-scale, 1));
  font-weight: var(--font-normal);
  line-height: 1.4;
  color: var(--text-secondary);
}

/* ios-caption2 → ios-caption1 (alias) */
.ios-caption2 {
  font-family: var(--font-sans);
  font-size: calc(0.75rem * var(--font-scale, 1));
  font-weight: var(--font-normal);
  line-height: 1.4;
  color: var(--text-tertiary);
}

/* ios-caption3, helper-text → ios-footnote (alias) */
.ios-caption3,
.helper-text {
  font-family: var(--font-sans);
  font-size: calc(0.625rem * var(--font-scale, 1));
  font-weight: var(--font-normal);
  line-height: 1.4;
  color: var(--text-tertiary);
}

/* ============================================ */
/*    UTILITY MODIFIERS                         */
/* ============================================ */

.font-400 { font-weight: 400; }
.font-500 { font-weight: 500; }
.font-600 { font-weight: 600; }
.font-700 { font-weight: 700; }

.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

.uppercase  { text-transform: uppercase; }
.lowercase  { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* Color overrides on text classes */
.body-text.text-primary,
.ios-body.text-primary {
  color: var(--text-primary);
}

.body-text.text-tertiary,
.ios-body.text-tertiary {
  color: var(--text-tertiary);
}

/* ============================================ */
/*    SPECIAL ELEMENTS                          */
/* ============================================ */

::placeholder {
  color: var(--text-tertiary);
  opacity: 1;
}

::selection {
  background-color: var(--accent-primary);
  color: white;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

code, pre {
  font-family: var(--font-sans);
  font-size: 0.875em;
  background: var(--glass-primary);
  padding: 0.125em 0.25em;
  border-radius: 0.25em;
}

/* ============================================ */
/*    PRINT STYLES                              */
/* ============================================ */

@media print {
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: black;
  }

  .ios-large-title, .heading-1 { font-size: 48pt; }
  .ios-title1, .heading-2      { font-size: 36pt; }
  .ios-title2, .heading-3      { font-size: 30pt; }
  .ios-title3                   { font-size: 24pt; }
  .ios-headline                 { font-size: 18pt; }
  .ios-body, .body-text         { font-size: 12pt; }
  .ios-callout, .form-label     { font-size: 10.5pt; }
  .ios-caption1, .caption       { font-size: 9pt; }
  .ios-footnote, .helper-text   { font-size: 7.5pt; }
}


/* ============================================ */
/*              5. GLASS MORPHISM SYSTEM        */
/*   Liquid Glass: 2 containers + buttons       */
/* ============================================ */
/**
 * COEUS DESIGN SYSTEM — LIQUID GLASS SYSTEM
 *
 * PURPOSE:
 * Two-level container system with clear glass aesthetic.
 * Low blur reveals the background, chromatic dispersion borders
 * give a physical glass feel.
 *
 * CONTAINERS:
 *   .glass-card      — prominent (main cards, modals, panels)
 *   .glass-container — subtle   (nested sections, list items)
 *
 * BUTTONS:
 *   .glass-button    — standard glass button
 *
 * INPUTS:
 *   Global styling on native input/select/textarea
 *
 * VERSION: 3.0.0
 * CREATED: 2026-03-03
 */

/* ============================================ */
/*    GLASS CARD — prominent container          */
/* ============================================ */

.glass-card,
.coeus-box {
  background: var(--_glass-card-bg, var(--glass-primary));
  backdrop-filter: var(--_glass-card-blur, var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: var(--_glass-card-blur, var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  border-image: linear-gradient(135deg,
    rgba(255, 149, 0, 0.15),
    rgba(255, 255, 255, 0.08),
    rgba(255, 149, 0, 0.10)
  ) 1;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 40px rgba(255, 149, 0, 0.03);
  border-radius: var(--radius-lg);
  padding: var(--spacing-8);
  position: relative;
  isolation: isolate;
  transition: box-shadow var(--transition-base);
}

/* border-image breaks border-radius — use pseudo-element for orange dispersion */
.glass-card,
.coeus-box {
  border-image: none;
}

.glass-card::before,
.coeus-box::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(255, 149, 0, 0.15),
    rgba(255, 255, 255, 0.08),
    rgba(255, 149, 0, 0.10)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}

/* ============================================ */
/*    GLASS CONTAINER — subtle container        */
/* ============================================ */

.glass-container,
.glass-container-thin {
  background: var(--glass-secondary);
  backdrop-filter: var(--glass-blur) saturate(150%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-6);
  position: relative;
  transition: box-shadow var(--transition-base);
}

/* ============================================ */
/*    GLASS BUTTON                              */
/* ============================================ */

.glass-button,
.glass-button-thin {
  background: var(--glass-secondary);
  backdrop-filter: var(--glass-blur) saturate(150%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.75em 1.5em;
  font-weight: var(--font-semibold);
  font-family: var(--font-sans);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  user-select: none;
  text-decoration: none;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.1);
}

.glass-button:hover,
.glass-button-thin:hover {
  background: var(--glass-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.15);
}

.glass-button:active,
.glass-button-thin:active {
  transform: translateY(0);
}

/* Button sizes */
.glass-button.btn-sm {
  padding: 0.5em 1em;
  font-size: 0.875em;
  border-radius: var(--radius-sm);
}

.glass-button.btn-lg {
  padding: 1em 2em;
  font-size: 1.125em;
  border-radius: var(--radius-md);
}

/* Button color variants */
.glass-button.btn-primary {
  background: rgba(var(--accent-primary-rgb), 0.25);
  color: white;
}

.glass-button.btn-success {
  background: rgba(var(--accent-success-rgb), 0.25);
  color: white;
}

.glass-button.btn-danger {
  background: rgba(var(--accent-danger-rgb), 0.25);
  color: white;
}

.glass-button.btn-warning {
  background: rgba(var(--accent-warning-rgb), 0.25);
  color: white;
}

/* Disabled state */
.glass-button:disabled,
.glass-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Disabled card state (coming soon, inactive features) */
.tool-card-disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: default;
}

/* ============================================ */
/*    PILL BUTTONS                              */
/* ============================================ */

.btn-pill {
  border-radius: 9999px;
  padding: 0.75em 1.5em;
  font-weight: var(--font-medium);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}

.btn-pill-primary {
  background: linear-gradient(135deg, var(--accent-primary), #fb923c);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(var(--accent-primary-rgb), 0.3);
}

.btn-pill-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--accent-primary-rgb), 0.4);
}

.btn-pill-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-pill-ghost:hover {
  background: var(--glass-hover);
  border-color: var(--accent-primary);
}

.btn-pill-subtle {
  background: var(--glass-primary);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-pill-subtle:hover {
  background: var(--glass-hover);
}

/* ============================================ */
/*    MODAL / POPUP SYSTEM                      */
/* ============================================ */

.modal-overlay,
.dialog-overlay,
[data-radix-dialog-overlay] {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  z-index: var(--z-modal-backdrop);
  animation: fadeIn 0.2s ease;
}

/*
 * Overlay context: promote child glass containers to modal-level opacity.
 * The --_glass-card-bg / --_glass-card-blur cascade variables are read by
 * .glass-card and .coeus-box so they automatically get readable backgrounds
 * when placed inside any overlay (modal, dialog, popover).
 */
.modal-overlay,
.dialog-overlay,
[data-radix-dialog-overlay],
.modal {
  --_glass-card-bg: var(--glass-modal-bg);
  --_glass-card-blur: blur(40px);
}

.modal-content,
.dialog-content,
[data-radix-dialog-content] {
  background: var(--glass-modal-bg, var(--glass-primary));
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  position: relative;
  z-index: var(--z-modal);
  animation: glassModalEnter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup,
.dropdown-content,
[data-radix-popover-content],
[data-radix-dropdown-menu-content] {
  background: var(--glass-primary);
  backdrop-filter: var(--glass-blur) saturate(180%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

/* Modal sizing */
.modal-modern {
  width: min(90vw, var(--modal-max-width, 37.5em));
  max-height: min(90vh, var(--modal-max-height, 50em));
  margin: auto;
  display: flex;
  flex-direction: column;
  background: var(--glass-modal-bg, var(--glass-secondary));
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-modern--sm { --modal-max-width: 25em; }
.modal-modern--md { --modal-max-width: 37.5em; }
.modal-modern--lg { --modal-max-width: 50em; }
.modal-modern--xl { --modal-max-width: 75em; }

@media (max-width: 48em) {
  .modal-modern {
    width: calc(100vw - 1em);
    max-height: calc(100vh - 2em);
    border-radius: var(--radius-md);
  }
}

/* Dark theme modal shadow boost */
[data-theme="dark"] .modal-modern,
[data-theme="darkart"] .modal-modern,
[data-theme="darkmodern"] .modal-modern {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ============================================ */
/*    GLOBAL NATIVE INPUT STYLING               */
/* ============================================ */

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="image"]):not([type="color"]),
select,
textarea {
  background: var(--input-bg) !important;
  color: var(--input-text) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: var(--radius-sm);
  padding: 0.75em 1em;
  font-size: 1em;
  font-family: var(--font-sans);
  outline: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="image"]):not([type="color"]):hover,
select:hover,
textarea:hover {
  background: var(--input-bg-hover) !important;
  border-color: var(--input-border-hover) !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="image"]):not([type="color"]):focus,
select:focus,
textarea:focus {
  background: var(--input-bg-focus) !important;
  border-color: var(--input-border-focus) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--input-placeholder) !important;
  opacity: 1;
}

/* Select dropdown arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75em center;
  padding-right: 2.5em;
}

select option {
  background: var(--background-primary);
  color: var(--text-primary);
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Autofill override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
  -webkit-text-fill-color: var(--input-text) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--input-bg-solid, var(--input-bg)) inset !important;
  box-shadow: 0 0 0px 1000px var(--input-bg-solid, var(--input-bg)) inset !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: var(--input-text) !important;
}

/* File input */
input[type="file"] {
  background: var(--input-bg) !important;
  color: var(--input-text) !important;
  border: 1px dashed var(--input-border) !important;
  border-radius: var(--radius-sm);
  padding: 0.75em 1em;
  cursor: pointer;
}

input[type="file"]:hover {
  background: var(--input-bg-hover) !important;
  border-color: var(--input-border-hover) !important;
}

input[type="file"]::file-selector-button {
  background: var(--glass-secondary);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: 0.375em;
  padding: 0.5em 1em;
  margin-right: 1em;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background var(--transition-fast);
}

input[type="file"]::file-selector-button:hover {
  background: var(--glass-hover);
}

/* Checkbox and Radio */
input[type="checkbox"],
input[type="radio"] {
  width: 1.25em;
  height: 1.25em;
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

input[type="checkbox"] {
  border-radius: 0.25em;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: var(--accent-primary) !important;
  border-color: var(--accent-primary) !important;
}

input[type="checkbox"]:checked::after {
  content: '';
  width: 0.5em;
  height: 0.25em;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg);
  margin-bottom: 2px;
}

input[type="radio"]:checked::after {
  content: '';
  width: 0.5em;
  height: 0.5em;
  background: white;
  border-radius: 50%;
}

/* Range slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  width: 100%;
  height: 0.5em;
}

input[type="range"]::-webkit-slider-runnable-track {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 0.25em;
  height: 0.5em;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.25em;
  height: 1.25em;
  background: var(--accent-primary);
  border-radius: 50%;
  cursor: pointer;
  margin-top: -0.4em;
}

/* ============================================ */
/*    UTILITY CLASSES                           */
/* ============================================ */

.no-glass {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--background-primary) !important;
  border: 1px solid var(--border-color) !important;
}

/* Interactive card with click animation */
.card-interactive {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-interactive:active {
  transform: scale(0.98);
}

/* ============================================ */
/*    ANIMATIONS                                */
/* ============================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes glassModalEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================ */
/*    ACCESSIBILITY                             */
/* ============================================ */

@media (prefers-reduced-motion: reduce) {
  .glass-card,
  .glass-container,
  .glass-button,
  .modal-content,
  .dialog-content {
    transition: box-shadow 0.2s ease !important;
    transform: none !important;
  }

  .glass-button:hover {
    transform: none !important;
  }

  @keyframes slideUp {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  @keyframes glassModalEnter {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

@media (prefers-contrast: high) {
  .glass-card,
  .glass-container {
    border-width: 2px;
  }
}

/* ============================================ */
/*    MOBILE ADJUSTMENTS                        */
/* ============================================ */

@media (max-width: 48em) {
  .glass-card,
  .coeus-box {
    padding: var(--spacing-6);
  }

  .glass-container,
  .glass-container-thin {
    padding: var(--spacing-4);
  }
}


/* ============================================ */
/*              6. BREAKPOINTS                  */
/*   Em-based responsive breakpoint system      */
/* ============================================ */
/**
 * COEUS DESIGN SYSTEM — BREAKPOINTS & DEVICE SUPPORT
 *
 * Breakpoint scale (em-based for accessibility):
 *   Phone:   max-width 48em   (768px)
 *   Tablet:  48em–64em        (768px–1024px)
 *   Desktop: min-width 64em   (1024px)
 *
 * Additional breakpoint variables are in design-tokens.css.
 * This file contains responsive container, device, orientation,
 * and print utilities.
 *
 * VERSION: 3.0.0
 * CREATED: 2026-03-03
 */

/* ============================================ */
/*    RESPONSIVE CONTAINER                      */
/* ============================================ */

.container-breakpoint {
  width: 100%;
  max-width: var(--container-sm);
  margin-inline: auto;
  padding-inline: 1em;
}

@media (min-width: 48em) {
  .container-breakpoint {
    max-width: var(--container-md);
    padding-inline: 1.5em;
  }
}

@media (min-width: 64em) {
  .container-breakpoint {
    max-width: var(--container-lg);
    padding-inline: 2em;
  }
}

@media (min-width: 80em) {
  .container-breakpoint {
    max-width: var(--container-xl);
  }
}

/* ============================================ */
/*    TOUCH / POINTER OPTIMIZATIONS             */
/* ============================================ */

@media (pointer: coarse) {
  .touch-target {
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
  }

  button,
  [role="button"],
  input[type="checkbox"],
  input[type="radio"],
  select {
    min-height: var(--touch-target-min);
  }
}

/* ============================================ */
/*    REDUCED MOTION (single definition)        */
/* ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================ */
/*    HIGH CONTRAST (single definition)         */
/* ============================================ */

@media (prefers-contrast: high) {
  :root {
    --glass-primary: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(0, 0, 0, 0.3);
  }

  [data-theme="dark"],
  [data-theme="darkart"],
  [data-theme="darkmodern"] {
    --glass-primary: rgba(0, 0, 0, 0.35);
    --glass-border: rgba(255, 255, 255, 0.4);
  }
}

/* ============================================ */
/*    ORIENTATION                               */
/* ============================================ */

@media (max-height: 30em) and (orientation: landscape) {
  .modal-responsive {
    max-height: 90vh;
    overflow-y: auto;
  }

  .sidebar-responsive {
    position: fixed;
    height: 100vh;
  }
}

@media (min-width: 48em) and (max-width: 64em) and (orientation: portrait) {
  .grid-tablet-portrait {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================ */
/*    DARK MODE SYSTEM PREFERENCE               */
/* ============================================ */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
  }
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
  }
}

/* ============================================ */
/*    PRINT (single definition)                 */
/* ============================================ */

@media print {
  .no-print {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .glass-card,
  .glass-container,
  .coeus-box {
    background: white !important;
    backdrop-filter: none !important;
    border: 1px solid #ccc !important;
  }

  body {
    color: black !important;
    background: white !important;
  }

  .page-break-before { page-break-before: always; }
  .page-break-after  { page-break-after: always; }
  .avoid-page-break  { page-break-inside: avoid; }
}


/* ============================================ */
/*              9. COMPONENTS                   */
/*   Reusable UI components (unchanged)        */
/* ============================================ */
/**
 * Radix UI Component Customizations
 *
 * This file contains all Radix UI component overrides and customizations
 * for the COEUS application.
 *
 * Components included:
 * - Animations (@keyframes)
 * - Dialog/Modal
 * - AlertDialog
 * - Select
 * - ScrollArea
 * - ToggleGroup
 * - Tooltip
 * - Toast
 * - Separator
 * - Progress
 * - Custom utility classes
 */

/* ============================================ */
/*          BODONI MODA FONT SETTINGS           */
/* ============================================ */

/* All Radix components use Bodoni Moda */
[data-radix-dialog-content],
[data-radix-alert-dialog-content],
[data-radix-select-trigger],
[data-radix-select-content],
[data-radix-select-item],
[data-radix-tooltip-content],
[data-radix-toast-root],
.radix-card,
.radix-button {
    font-family: var(--font-sans);
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

/* Headings and titles in Radix components - heavier weight */
[data-radix-dialog-content] h1,
[data-radix-dialog-content] h2,
[data-radix-dialog-content] h3,
[data-radix-dialog-content] h4,
[data-radix-dialog-content] h5,
[data-radix-dialog-content] h6,
[data-radix-alert-dialog-content] h1,
[data-radix-alert-dialog-content] h2,
[data-radix-alert-dialog-content] h3,
.radix-card h1,
.radix-card h2,
.radix-card h3 {
    font-family: var(--font-serif);
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
}

/* ============================================ */
/*              RADIX ANIMATIONS                */
/* ============================================ */

@keyframes overlayShow {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes contentShow {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes slideUpAndFade {
    from {
        opacity: 0;
        transform: translateY(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDownAndFade {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(calc(100% + 25px));
    }
    to {
        transform: translateX(0);
    }
}

@keyframes swipeOut {
    from {
        transform: translateX(var(--radix-toast-swipe-end-x));
    }
    to {
        transform: translateX(calc(100% + 25px));
    }
}

/* Animation utility classes */
[data-state="open"] {
    animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.data-\[state\=open\]\:animate-overlayShow[data-state="open"] {
    animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.data-\[state\=open\]\:animate-contentShow[data-state="open"] {
    animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================ */
/*           DIALOG COMPONENT STYLES            */
/* ============================================ */

[data-radix-dialog-overlay] {
    background-color: var(--text-tertiary);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    position: fixed;
    inset: 0;
    animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9998;
}

[data-radix-dialog-content] {
    background: var(--glass-secondary, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    color: var(--text-primary);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 900px;
    max-height: 85vh;
    padding: 25px;
    animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
}

/* ============================================ */
/*        ALERT DIALOG COMPONENT STYLES         */
/* ============================================ */

[data-radix-alert-dialog-overlay] {
    background-color: var(--text-tertiary);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    position: fixed;
    inset: 0;
    animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9998;
}

[data-radix-alert-dialog-content] {
    background: var(--glass-secondary, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    color: var(--text-primary);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 450px;
    padding: 20px;
    animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
}

/* ============================================ */
/*          SELECT COMPONENT STYLES             */
/* ============================================ */

[data-radix-select-trigger] {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    gap: 5px;
    background: var(--glass-primary, rgba(255, 255, 255, 0.1));
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-radix-select-trigger]:hover {
    background: var(--glass-hover, rgba(255, 255, 255, 0.15));
    border-color: var(--ios-system-orange, #f97316);
}

[data-radix-select-trigger]:focus {
    outline: none;
    border-color: var(--ios-system-orange, #f97316);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

[data-radix-select-content] {
    background: var(--glass-secondary, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 10000;
}

[data-radix-select-item] {
    display: flex;
    align-items: center;
    height: 32px;
    padding: 0 25px 0 12px;
    position: relative;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-primary);
    transition: background-color 0.15s;
    outline: none;
}

[data-radix-select-item]:hover {
    background: var(--glass-hover, rgba(0, 0, 0, 0.05));
}

[data-radix-select-item][data-highlighted] {
    background: var(--glass-hover, rgba(249, 115, 22, 0.1));
}

/* ============================================ */
/*        SCROLL AREA COMPONENT STYLES          */
/* ============================================ */

[data-radix-scroll-area-viewport] {
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

[data-radix-scroll-area-viewport]::-webkit-scrollbar {
    display: none;
}

[data-radix-scroll-area-scrollbar] {
    display: flex;
    user-select: none;
    touch-action: none;
    padding: 2px;
    background: transparent;
    transition: background 150ms;
}

[data-radix-scroll-area-scrollbar]:hover {
    background: var(--glass-primary, rgba(0, 0, 0, 0.05));
}

[data-radix-scroll-area-scrollbar][data-orientation="vertical"] {
    width: 10px;
}

[data-radix-scroll-area-thumb] {
    flex: 1;
    background: var(--text-tertiary, rgba(0, 0, 0, 0.3));
    border-radius: 10px;
    position: relative;
}

[data-radix-scroll-area-thumb]:hover {
    background: var(--text-secondary, rgba(0, 0, 0, 0.5));
}

/* ============================================ */
/*       TOGGLE GROUP COMPONENT STYLES          */
/* ============================================ */

[data-radix-toggle-group-root] {
    display: inline-flex;
    background: var(--glass-primary, rgba(0, 0, 0, 0.05));
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

[data-radix-toggle-group-item] {
    background-color: transparent;
    color: var(--text-secondary);
    height: 32px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

[data-radix-toggle-group-item]:hover {
    background: var(--glass-hover, rgba(255, 255, 255, 0.5));
}

[data-radix-toggle-group-item][data-state="on"] {
    background: var(--glass-secondary, rgba(255, 255, 255, 0.85));
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================ */
/*         TOOLTIP COMPONENT STYLES             */
/* ============================================ */

[data-radix-tooltip-content] {
    background: var(--glass-secondary, rgba(31, 41, 55, 0.95));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    color: var(--text-primary);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.5;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10001;
}

/* ============================================ */
/*          TOAST COMPONENT STYLES              */
/* ============================================ */

[data-radix-toast-viewport] {
    position: fixed;
    bottom: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    padding: 25px;
    gap: 10px;
    width: 390px;
    max-width: 100vw;
    margin: 0;
    list-style: none;
    z-index: 10000;
}

[data-radix-toast-root] {
    background: var(--glass-secondary, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    color: var(--text-primary);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 15px;
    display: grid;
    grid-template-areas: "title action" "description action";
    grid-template-columns: auto max-content;
    column-gap: 15px;
    align-items: center;
}

[data-radix-toast-root][data-state="open"] {
    animation: slideIn 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-radix-toast-root][data-state="closed"] {
    animation: swipeOut 100ms ease-out;
}

/* ============================================ */
/*        SEPARATOR COMPONENT STYLES            */
/* ============================================ */

[data-radix-separator-root] {
    background: var(--glass-border, rgba(0, 0, 0, 0.1));
}

[data-radix-separator-root][data-orientation="horizontal"] {
    height: 1px;
    width: 100%;
}

[data-radix-separator-root][data-orientation="vertical"] {
    width: 1px;
    height: 100%;
}

/* ============================================ */
/*         PROGRESS COMPONENT STYLES            */
/* ============================================ */

[data-radix-progress-root] {
    position: relative;
    overflow: hidden;
    background: var(--glass-primary, rgba(0, 0, 0, 0.1));
    border-radius: 99999px;
    width: 100%;
    height: 8px;
}

[data-radix-progress-indicator] {
    background: linear-gradient(90deg, var(--ios-system-orange, #f97316), var(--ios-system-yellow, #fbbf24));
    width: 100%;
    height: 100%;
    transition: transform 300ms cubic-bezier(0.65, 0, 0.35, 1);
}

/* ============================================ */
/*         CUSTOM RADIX UTILITY CLASSES         */
/* ============================================ */

.radix-card {
    background: var(--glass-primary, rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    color: var(--text-primary);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.radix-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--glass-border-hover, rgba(249, 115, 22, 0.3));
}

.radix-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    outline: none;
}

.radix-button-primary {
    background: linear-gradient(135deg, var(--ios-system-orange, #f97316), #fb923c);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.radix-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.radix-button-secondary {
    background: var(--glass-secondary, rgba(0, 0, 0, 0.05));
    color: var(--text-primary);
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
}

.radix-button-secondary:hover {
    background: var(--glass-hover, rgba(0, 0, 0, 0.08));
    border-color: var(--glass-border-hover, rgba(249, 115, 22, 0.3));
}

.radix-button-danger {
    background: linear-gradient(135deg, var(--ios-system-red, #ef4444), #f87171);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.radix-button-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ============================================ */
/*       DARK THEME SPECIFIC ADJUSTMENTS        */
/* ============================================ */

[data-theme="dark"] [data-radix-dialog-content],
[data-theme="dark"] [data-radix-alert-dialog-content],
[data-theme="dark"] [data-radix-toast-root],
[data-theme="dark"] [data-radix-select-content],
[data-theme="darkart"] [data-radix-dialog-content],
[data-theme="darkart"] [data-radix-alert-dialog-content],
[data-theme="darkart"] [data-radix-toast-root],
[data-theme="darkart"] [data-radix-select-content],
[data-theme="darkmodern"] [data-radix-dialog-content],
[data-theme="darkmodern"] [data-radix-alert-dialog-content],
[data-theme="darkmodern"] [data-radix-toast-root],
[data-theme="darkmodern"] [data-radix-select-content] {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .radix-card,
[data-theme="darkart"] .radix-card,
[data-theme="darkmodern"] .radix-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .radix-card:hover,
[data-theme="darkart"] .radix-card:hover,
[data-theme="darkmodern"] .radix-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ============================================ */
/*      RADIX THEMES.CSS VARIABLE OVERRIDES     */
/* ============================================ */

/* Override Radix themes variables for COEUS dark themes */
[data-theme="dark"],
[data-theme="darkart"],
[data-theme="darkmodern"] {
    /* Map Radix color variables to COEUS theme system */
    --color-background: var(--glass-primary);
    --color-panel-solid: var(--glass-secondary);
    --color-panel-translucent: var(--glass-primary);
    --color-surface: var(--glass-secondary);

    /* Override Radix accent colors to use COEUS orange */
    --accent-9: var(--ios-system-orange);
    --accent-10: #fb923c;
    --accent-a8: rgba(249, 115, 22, 0.8);

    /* Override Radix gray scale for dark themes */
    --gray-1: rgba(20, 20, 20, 0.95);
    --gray-2: rgba(30, 30, 30, 0.9);
    --gray-3: rgba(40, 40, 40, 0.85);
    --gray-12: var(--text-primary);
    --gray-11: var(--text-secondary);

    /* Override blue to use orange (brand color) */
    --blue-9: var(--ios-system-orange);
    --blue-indicator: var(--ios-system-orange);
    --blue-track: var(--ios-system-orange);
}

/* Override Radix Select components for proper theme colors */
[data-theme="dark"] [data-radix-select-trigger],
[data-theme="darkart"] [data-radix-select-trigger],
[data-theme="darkmodern"] [data-radix-select-trigger] {
    background: var(--glass-primary);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

[data-theme="dark"] [data-radix-select-item],
[data-theme="darkart"] [data-radix-select-item],
[data-theme="darkmodern"] [data-radix-select-item] {
    color: var(--text-primary);
}

[data-theme="dark"] [data-radix-select-item][data-highlighted],
[data-theme="darkart"] [data-radix-select-item][data-highlighted],
[data-theme="darkmodern"] [data-radix-select-item][data-highlighted] {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* Override Radix Progress indicator */
[data-theme="dark"] [data-radix-progress-indicator],
[data-theme="darkart"] [data-radix-progress-indicator],
[data-theme="darkmodern"] [data-radix-progress-indicator] {
    background: linear-gradient(90deg, var(--ios-system-orange, #f97316), #fb923c);
}

/* Override Radix Tooltip for dark themes */
[data-theme="dark"] [data-radix-tooltip-content],
[data-theme="darkart"] [data-radix-tooltip-content],
[data-theme="darkmodern"] [data-radix-tooltip-content] {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

/**
 * @file icons.css
 * @description Radix Icon System Styles
 *
 * Icon system uses SVG sprites with <symbol> references
 * No inline SVG code - all icons referenced via <use>
 *
 * Usage:
 * HTML: <i class="radix-icon" data-icon="plus"></i>
 * JS:   element.innerHTML = RadixIcon('plus', 'icon-lg text-primary');
 */

/* ============================================
   Base Icon Styles
   ============================================ */

/**
 * Default icon styling
 * - Inherits color from parent (currentColor)
 * - Default 15x15 size (Radix standard)
 * - Inline display for text flow
 */
svg.icon,
.radix-icon {
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  width: 1em; /* Scales with font size */
  height: 1em;
  flex-shrink: 0;
}

/**
 * Icon sizing utilities
 * Predefined sizes for consistency
 */
.icon-xs {
  width: 0.75rem;  /* 12px */
  height: 0.75rem;
}

.icon-sm {
  width: 0.875rem; /* 14px */
  height: 0.875rem;
}

.icon-md {
  width: 1rem;     /* 16px - Default */
  height: 1rem;
}

.icon-lg {
  width: 1.25rem;  /* 20px */
  height: 1.25rem;
}

.icon-xl {
  width: 1.5rem;   /* 24px */
  height: 1.5rem;
}

.icon-2xl {
  width: 2rem;     /* 32px */
  height: 2rem;
}

.icon-3xl {
  width: 3rem;     /* 48px */
  height: 3rem;
}

/* ============================================
   Icon Button Styles
   ============================================ */

/**
 * Icon-only buttons
 * Square buttons with centered icons
 */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm, 8px);
  transition: background-color 0.2s ease;
}

.icon-button:hover {
  background-color: var(--glass-hover);
}

.icon-button:active {
  transform: scale(0.95);
}

.icon-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ============================================
   Icon with Text Spacing
   ============================================ */

/**
 * Spacing when icons are used with text
 */
.icon-text-left svg,
.icon-text-left .radix-icon {
  margin-right: 0.5rem;
}

.icon-text-right svg,
.icon-text-right .radix-icon {
  margin-left: 0.5rem;
}

/* Helper classes for inline usage */
.mr-icon {
  margin-right: 0.5rem;
}

.ml-icon {
  margin-left: 0.5rem;
}

/* ============================================
   Icon States & Colors
   ============================================ */

/**
 * Icon color utilities
 * Use these for semantic meaning
 */
.icon-primary {
  color: var(--text-primary);
}

.icon-secondary {
  color: var(--text-secondary);
}

.icon-tertiary {
  color: var(--text-tertiary);
}

.icon-success {
  color: var(--ios-system-green);
}

.icon-warning {
  color: var(--ios-system-orange);
}

.icon-error,
.icon-danger {
  color: var(--ios-system-red);
}

.icon-info {
  color: var(--ios-system-orange);
}

/* ============================================
   Icon Animations
   ============================================ */

/**
 * Spinning animation for loading states
 */
.icon-spin {
  animation: icon-spin 1s linear infinite;
}

@keyframes icon-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/**
 * Pulse animation for notifications
 */
.icon-pulse {
  animation: icon-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes icon-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ============================================
   Icon in Navigation
   ============================================ */

/**
 * Navigation/sidebar icons
 */
.nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  color: var(--text-primary);
}

/* ============================================
   Accessibility
   ============================================ */

/**
 * Hide decorative icons from screen readers
 * Icons with aria-label will be announced
 */
svg[aria-hidden="true"] {
  pointer-events: none;
}

/**
 * Ensure proper focus for interactive icons
 */
.icon-button:focus-visible {
  outline: 2px solid var(--ios-system-orange);
  outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  .icon-button {
    display: none;
  }

  svg.icon,
  .radix-icon {
    color: black;
  }
}

/**
 * COEUS Design System - Document Card Component
 *
 * PURPOSE:
 * Simplified modern glassmorphism card for document display
 *
 * DESIGN PRINCIPLES:
 * - Clean, minimal design
 * - A4 aspect ratio (1:1.414) enforced via aspect-ratio property
 * - Preview image fills container height (100%) with object-fit: cover
 * - Title and date stacked vertically, left-aligned
 * - Title wraps to max 2 lines, breaks long words if needed
 * - Ellipsis after 2 lines, full name shown on hover tooltip
 * - Entire card is clickable
 * - Checkbox floats over image with translucent orange background
 * - Perfect border radius alignment (card: 20px, image: 20px top corners)
 *
 * CENTRALIZED TYPOGRAPHY (Updated 2025-12-15):
 * All font sizes use CSS variables from typography-system.css with --font-scale:
 * - --font-card-title: 16px at M scale (1rem)
 * - --font-card-date: 12px at M scale (0.75rem)
 * - --font-card-icon: 14px at M scale (0.875rem)
 * All sizes multiply by --font-scale for user preference (XS/S/M/L/XL)
 *
 * TO CHANGE TYPOGRAPHY:
 * Edit variables in: /css/typography-system.css
 * Example: --font-card-title: 1rem; (16px)
 *
 * RESPONSIVE DESIGN:
 * - Uses `em` units for all sizing (NOT rem or px) for true responsiveness
 * - Grid minimum widths: 17.5em (desktop) → 15em (tablet) → 12.5em (mobile) → 11em (xs)
 * - Breakpoints: 48em (768px), 30em (480px), 23.5em (375px)
 * - Font sizes scale with user preference via --font-scale
 * - Layout-only media queries for padding, spacing, dimensions
 * - All spacing uses design tokens (--spacing-sm, --spacing-md, etc.)
 *
 * DEPENDENCIES: typography-system.css, core/themes.css
 * LAST UPDATED: 2025-12-15
 */

/* ============================================ */
/*           DOCUMENT GRID LAYOUT               */
/* ============================================ */

.documents-grid {
    display: grid;
    /* A4 aspect ratio cards with responsive sizing - using em for true responsiveness */
    grid-template-columns: repeat(auto-fill, minmax(17.5em, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    max-width: 100%;
}

/* ============================================ */
/*           DOCUMENT CARD                      */
/* ============================================ */

.document-card {
    /* Glassmorphism Base */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.15) 100%
    );
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);

    /* Border & Shape */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;

    /* Layout */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;

    /* A4 Aspect Ratio (1:1.414) with 10% flexibility */
    aspect-ratio: 1 / 1.414;
    width: 100%;

    /* Shadows */
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.04);

    /* Interaction */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.document-card:hover {
    transform: translateY(-4px) scale(1.01);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.25) 100%
    );
    border-color: var(--text-tertiary);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        0 16px 32px rgba(0, 0, 0, 0.12),
        0 4px 8px rgba(0, 0, 0, 0.06);
}

/* ============================================ */
/*           CHECKBOX (Compact)                 */
/* ============================================ */

.doc-checkbox {
    /* Position */
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;

    /* Compact Size - still meets WCAG AA */
    width: 32px;
    height: 32px;

    /* Translucent orange background (30% opacity) */
    background: rgba(255, 94, 58, 0.3);
    border: none;
    border-radius: 8px;
    position: relative;

    /* Interaction */
    cursor: pointer;
    transition: all 0.2s ease;

    /* Center content */
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-checkbox:hover {
    background: rgba(255, 94, 58, 0.5); /* Slightly more opaque on hover */
    transform: scale(1.1);
}

.doc-checkbox.checked {
    background: var(--ios-system-orange);
}

/* Checkmark icon */
.doc-checkbox.checked::after {
    content: '✓';
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: bold;
    line-height: 1;
    z-index: 1;
}

/* ============================================ */
/*      DOCUMENT PREVIEW (~78% height)         */
/* ============================================ */

.document-preview {
    /* Take remaining space, leaving room for info */
    flex: 1 1 auto;
    min-height: 0; /* Important for flexbox */

    /* Background */
    background: transparent;

    /* Layout */
    display: flex;
    align-items: flex-start; /* Align to top */
    justify-content: center;
    position: relative;
    overflow: hidden; /* Prevent overflow */

    /* No padding - margin is on image itself */
    padding: 0;
    margin: 0;

    /* No rounded corners on container */
    border-radius: 0;

    /* Ensure proper height calculation */
    width: 100%;
}

/* Thumbnail image when loaded */
.document-preview img {
    /* Full width minus 2px margin on each side (left + right) */
    width: calc(100% - 4px);
    height: 100%;
    object-fit: cover !important;
    object-position: top center; /* Align to top, centered horizontally */

    /* Rounded corners - matches card radius exactly (no top margin) */
    /* Card radius: 20px, image has no top margin = 20px */
    border-radius: 20px 20px 0 0;

    /* 2px margin on left, right, and bottom only - NO top margin */
    display: block;
    margin: 0 2px 2px 2px;
    padding: 0;
}

/* PDF icon fallback */
.document-icon {
    /* Typography - Centralized & Responsive with user preference scaling */
    font-size: calc(var(--font-card-icon, 0.875rem) * var(--font-scale, 1)); /* 14px at M scale */
    color: rgba(0, 0, 0, 0.2);
    transition: all var(--transition-base);
}

.document-card:hover .document-icon {
    transform: scale(1.1);
    color: rgba(0, 0, 0, 0.3);
}

/* ============================================ */
/*    DOCUMENT INFO (Title + Date Stacked)     */
/* ============================================ */

.document-info {
    /* Layout - Vertical Stack */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25em;

    /* Flexible height - adapts to font-scale, won't shrink */
    flex: 0 0 auto;

    /* Spacing - bottom padding gives breathing room above card edge */
    padding: 0.5em 0.6em 0.75em;

    /* Prevent overflow */
    overflow: hidden;

    /* Ensure info is always visible above thumbnail */
    position: relative;
    z-index: 2;
    background: var(--glass-primary, rgba(255, 255, 255, 0.15));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Document Title */
.document-title {
    /* Typography - Centralized & Responsive with user preference scaling */
    font-size: calc(var(--font-card-title, 1rem) * var(--font-scale, 1)); /* 16px at M scale */
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);

    /* Single-line truncation with ellipsis */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    /* Remove default margins */
    margin: 0;
    padding: 0;

    /* Hover tooltip */
    cursor: help;
    position: relative;
}

/* Show full title on hover */
.document-title:hover::after {
    content: attr(title);
    position: absolute;
    left: 0;
    top: 100%;
    z-index: var(--z-tooltip);

    /* Styling */
    background: rgba(0, 0, 0, 0.9);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: calc(var(--ios-caption2-base, 0.6875rem) * var(--font-scale, 1)); /* 11px at M scale */
    white-space: normal;
    word-wrap: break-word;
    max-width: 250px;

    /* Shadow */
    box-shadow: var(--shadow-lg);

    /* Animation */
    animation: tooltipFadeIn 0.2s ease-in;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Document Date */
.document-date {
    /* Typography - Centralized & Responsive with user preference scaling */
    font-size: calc(var(--font-card-date, 0.75rem) * var(--font-scale, 1)); /* 12px at M scale */
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;

    /* Layout */
    width: 100%;
    max-width: 100%;
    text-align: left;
    box-sizing: border-box;

    /* Remove default spacing */
    margin: 0;
    padding: 0;

    /* Prevent overflow */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================ */
/*      DOCUMENT ACCESS CHIPS                  */
/* ============================================ */

.document-access-placeholder {
    display: none;
}

.document-access-chips {
    display: flex;
    gap: 0.25em;
    padding: 0 0.5em 0.5em 0.5em;
    flex-wrap: wrap;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    background: var(--glass-primary, rgba(255, 255, 255, 0.15));
}

.access-chip {
    width: 1.75em;
    height: 1.75em;
    border-radius: 50%;
    background: var(--glass-secondary, rgba(255, 255, 255, 0.15));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    font-size: 0.65em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: default;
    transition: all 0.2s ease;
}

.access-chip:hover {
    background: var(--glass-hover, rgba(255, 255, 255, 0.25));
    transform: scale(1.1);
}

.access-chip.overflow {
    background: var(--ios-system-orange, #FF9500);
    color: var(--button-text-on-color);
    border-color: transparent;
}

/* Dark theme adjustments */
[data-theme="dark"] .access-chip {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .access-chip:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================ */
/*      RESPONSIVE LAYOUT (No Font Overrides)  */
/* ============================================ */
/* Font sizes handled by Fluid Typography in variables.css */

/* Tablet (≤ 48em = 768px at 16px default) */
@media (max-width: 48em) {
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
        gap: var(--spacing-md);
    }

    .document-info {
        padding: 0.45em 0.5em 0.6em;
        gap: 0.25em;
    }
}

/* Mobile (≤ 30em = 480px at 16px default) */
@media (max-width: 30em) {
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(12.5em, 1fr));
        gap: var(--spacing-md);
        padding: var(--spacing-sm);
    }

    .document-card {
        border-radius: var(--radius-md);
    }

    .doc-checkbox {
        width: 28px;
        height: 28px;
        top: 0.375rem;
        left: 0.375rem;
        border-radius: 6px;
    }

    .doc-checkbox::before {
        border-radius: 6px;
    }

    .doc-checkbox.checked::after {
        font-size: 1rem;
    }

    .document-preview img {
        /* Card radius: 16px - no top margin = 16px on top corners */
        border-radius: 16px 16px 0 0;
        width: calc(100% - 4px);
        height: 100%;
        margin: 0 2px 2px 2px;
    }

    .document-info {
        padding: 0.4em 0.4em 0.5em;
        gap: 0.2em;
    }
}

/* Extra Small (≤ 23.5em = 375px at 16px default) */
@media (max-width: 23.5em) {
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(11em, 1fr));
    }

    .document-info {
        padding: 0.4em 0.4em 0.5em;
        gap: 0.2em;
    }
}

/* ============================================ */
/*         LOADING & ANIMATIONS                 */
/* ============================================ */

/* Thumbnail loading spinner */
.document-preview .spinner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade-in animation for loaded thumbnails */
.document-preview img {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================ */
/*         REDUCED MOTION SUPPORT               */
/* ============================================ */

@media (prefers-reduced-motion: reduce) {
    .document-card,
    .doc-checkbox,
    .document-icon,
    .document-preview img,
    .document-title:hover::after {
        animation: none;
        transition: none;
    }

    .document-card:hover {
        transform: none;
    }
}

/* ============================================ */
/*         DARK MODE SUPPORT                    */
/* ============================================ */

[data-theme="dark"] .document-card {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .document-card:hover {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
    border-color: var(--text-quaternary);
}

[data-theme="dark"] .doc-checkbox {
    background: rgba(255, 94, 58, 0.25); /* Slightly less opaque in dark mode */
}

[data-theme="dark"] .doc-checkbox:hover {
    background: rgba(255, 94, 58, 0.45); /* Slightly more opaque on hover */
}

[data-theme="dark"] .document-preview {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .document-icon {
    color: var(--text-quaternary);
}

[data-theme="dark"] .document-card:hover .document-icon {
    color: var(--text-quaternary);
}

[data-theme="dark"] .document-title:hover::after {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
}

/**
 * Documents Modal Styles
 * Theme-aware modal system using CSS custom properties
 */

/* Base modal container - hidden by default */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Show modal when open class is added */
.modal.open {
    display: flex !important;
}

/* Modal content container */
.modal-content {
    background: var(--glass-modal-bg, var(--glass-secondary));
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

/* Modal close button */
.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--glass-hover);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--glass-active);
    color: var(--text-primary);
}

/* Modal title */
.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Modal actions footer */
.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

/* Alternative modal overlay class (legacy support) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

/* Hide modal-overlay when hidden class is added */
.modal-overlay.hidden {
    display: none !important;
}

/* Larger modal variant */
.modal-lg {
    max-width: 800px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
}
    to {
        opacity: 1;
}
}

.modal-container {
    /* Fixed positioning with transform centering - prevents left-to-center jump */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* More opaque background for better text readability */
    background: linear-gradient(
        135deg,
        rgba(var(--theme-glass-rgb, 255, 255, 255), 0.85) 0%,
        rgba(var(--theme-glass-rgb, 255, 255, 255), 0.75) 100%
    );
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    animation: modalSlideUp 0.3s ease;
    color: var(--text-primary);
    z-index: 10001;
}

/* Dark theme modal adjustments */
[data-theme="dark"] .modal-container,
[data-theme="darkart"] .modal-container,
[data-theme="darkmodern"] .modal-container {
    background: linear-gradient(
        135deg,
        rgba(30, 30, 35, 0.92) 0%,
        rgba(20, 20, 25, 0.88) 100%
    );
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

/* Modal size variants */
.modal-container.modal-sm {
    max-width: 400px;
}

.modal-container.modal-md {
    max-width: 600px;
}

.modal-container.modal-lg {
    max-width: 900px;
}

.modal-container.modal-xl {
    max-width: 90vw;
}

.modal-container.modal-fullheight {
    height: 90vh;
}

/* Modal content wrapper - replaces glass-card inside modals */
.modal-content-wrapper {
    background: transparent;
    border-radius: inherit;
    overflow: hidden;
}

/* Enhanced text contrast for modal content */
.modal-container h1,
.modal-container h2,
.modal-container h3,
.modal-container h4,
.modal-container h5,
.modal-container h6 {
    color: var(--text-primary);
}

.modal-container p,
.modal-container span:not([class*="text-"]),
.modal-container label {
    color: var(--text-secondary);
}

/* Glass inputs inside modals */
.modal-container input,
.modal-container textarea,
.modal-container select {
    color: var(--text-primary);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
}

.modal-container input::placeholder,
.modal-container textarea::placeholder {
    color: var(--text-tertiary);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal-specific slide up animation that preserves centering transform */
@keyframes modalSlideUp {
    from {
        transform: translate(-50%, calc(-50% + 30px));
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h2 i {
    color: var(--ios-system-orange);
}

.modal-close-btn {
    background: var(--glass-hover);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: var(--glass-active);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.loader {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
    font-size: 16px;
}

.loader i {
    font-size: 32px;
    color: var(--ios-system-orange);
    margin-bottom: 16px;
    display: block;
}

.error-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--ios-system-red);
    font-size: 16px;
}

.error-message i {
    font-size: 32px;
    margin-bottom: 16px;
    display: block;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-state i {
    color: var(--text-quaternary);
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* Scoped to modals only - prevent overriding main page grid */
.modal .documents-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-document-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: start;
    transition: all 0.2s ease;
}

.modal-document-card:hover {
    background: var(--glass-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.document-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-secondary);
    border-radius: 8px;
    flex-shrink: 0;
}

.modal-document-card .document-info {
    flex: 1;
    min-width: 0;
}

.modal-document-card .document-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-meta {
    display: flex;
    gap: 1em;
    font-size: 0.8125em;
    color: var(--text-tertiary);
    margin-bottom: 0.375em;
}

.document-meta span {
    display: flex;
    align-items: center;
    gap: 0.375em;
}

.document-description {
    font-size: 0.8125em;
    color: var(--text-secondary);
    margin: 0.5em 0 0 0;
    line-height: 1.5;
}

.document-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Icon button - used for close buttons in modals */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: var(--glass-hover, rgba(255, 255, 255, 0.15));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-icon:hover {
    background: var(--glass-active, rgba(255, 255, 255, 0.25));
    color: var(--text-primary);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Theme-specific btn-icon overrides */
[data-theme="dark"] .btn-icon,
[data-theme="darkmodern"] .btn-icon,
[data-theme="darkart"] .btn-icon {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

[data-theme="dark"] .btn-icon:hover,
[data-theme="darkmodern"] .btn-icon:hover,
[data-theme="darkart"] .btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 90vh;
}

    .modal-header {
        padding: 16px;
}

    .modal-body {
        padding: 16px;
}

    .modal-document-card {
        flex-direction: column;
}

    .document-actions {
        width: 100%;
        justify-content: flex-end;
}

    .modal-footer {
        flex-direction: column-reverse;
}

    .modal-footer button {
        width: 100%;
}
}

/**
 * COEUS Design System - Defect Entry Modal
 *
 * PURPOSE:
 * Beautiful, glass-morphism defect/damage entry modal
 * for Swiss property handover protocols
 *
 * AESTHETIC:
 * - Warm glassmorphism with orange accents
 * - Smooth micro-interactions
 * - Professional Swiss design sensibility
 * - Mobile-first responsive
 */

/* ============================================ */
/*           MODAL OVERLAY                      */
/* ============================================ */
.defect-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.defect-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ============================================ */
/*           MODAL CONTAINER                    */
/* ============================================ */
.defect-modal {
    background: rgba(var(--theme-glass-rgb, 255, 255, 255), 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 0 1px var(--glass-stroke-gradient-subtle, rgba(255, 160, 80, 0.2)),
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 80px -20px rgba(255, 140, 60, 0.15);
    border: 1px solid rgba(255, 180, 120, 0.2);
    transform: scale(0.95) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease-out;
}

.defect-modal-overlay.open .defect-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* ============================================ */
/*           MODAL HEADER                       */
/* ============================================ */
.defect-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(var(--theme-glass-rgb, 0, 0, 0), 0.08);
    background: linear-gradient(180deg,
        rgba(255, 180, 100, 0.08) 0%,
        transparent 100%);
}

.defect-modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.defect-modal-title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg,
        rgba(255, 149, 0, 0.15),
        rgba(255, 59, 48, 0.15));
    border-radius: 10px;
    font-size: 1.25rem;
}

.defect-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--theme-glass-rgb, 0, 0, 0), 0.06);
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

.defect-modal-close:hover {
    background: rgba(var(--theme-glass-rgb, 0, 0, 0), 0.12);
    color: var(--text-primary);
    transform: scale(1.05);
}

.defect-modal-close:active {
    transform: scale(0.95);
}

/* ============================================ */
/*           MODAL BODY                         */
/* ============================================ */
.defect-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ============================================ */
/*           FORM FIELD GROUP                   */
/* ============================================ */
.defect-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.defect-field-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.defect-field-label.required::after {
    content: ' *';
    color: var(--ios-system-orange);
}

/* ============================================ */
/*           TEXT INPUTS                        */
/* ============================================ */
.defect-input,
.defect-textarea,
.defect-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(var(--theme-glass-rgb, 0, 0, 0), 0.04);
    border: 1px solid rgba(var(--theme-glass-rgb, 0, 0, 0), 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.defect-input:focus,
.defect-textarea:focus,
.defect-select:focus {
    outline: none;
    border-color: var(--ios-system-orange);
    background: rgba(var(--theme-glass-rgb, 0, 0, 0), 0.06);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.15);
}

.defect-input::placeholder,
.defect-textarea::placeholder {
    color: var(--text-tertiary);
}

.defect-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.defect-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================================ */
/*           SEVERITY SELECTOR                  */
/* ============================================ */
.defect-severity-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.defect-severity-option {
    position: relative;
}

.defect-severity-option input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.defect-severity-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: rgba(var(--theme-glass-rgb, 0, 0, 0), 0.04);
    border: 2px solid rgba(var(--theme-glass-rgb, 0, 0, 0), 0.08);
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.defect-severity-option input:hover + .defect-severity-card {
    background: rgba(var(--theme-glass-rgb, 0, 0, 0), 0.08);
    transform: translateY(-2px);
}

.defect-severity-option input:checked + .defect-severity-card {
    border-color: var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.1);
    box-shadow: 0 4px 20px rgba(255, 149, 0, 0.2);
}

.defect-severity-icon {
    font-size: 1.75rem;
    transition: transform 0.25s ease;
}

.defect-severity-option input:checked + .defect-severity-card .defect-severity-icon {
    transform: scale(1.15);
}

.defect-severity-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.defect-severity-option input:checked + .defect-severity-card .defect-severity-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* Severity color coding */
.defect-severity-option[data-severity="leicht"] input:checked + .defect-severity-card {
    border-color: var(--ios-system-green);
    background: rgba(52, 199, 89, 0.1);
    box-shadow: 0 4px 20px rgba(52, 199, 89, 0.2);
}

.defect-severity-option[data-severity="mittel"] input:checked + .defect-severity-card {
    border-color: var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.1);
    box-shadow: 0 4px 20px rgba(255, 149, 0, 0.2);
}

.defect-severity-option[data-severity="schwer"] input:checked + .defect-severity-card {
    border-color: var(--ios-system-red);
    background: rgba(255, 59, 48, 0.1);
    box-shadow: 0 4px 20px rgba(255, 59, 48, 0.2);
}

/* ============================================ */
/*           RESPONSIBILITY SELECTOR            */
/* ============================================ */
.defect-responsibility-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.defect-responsibility-option {
    position: relative;
    display: flex;
    align-items: center;
}

.defect-responsibility-option input {
    position: absolute;
    opacity: 0;
}

.defect-responsibility-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(var(--theme-glass-rgb, 0, 0, 0), 0.04);
    border: 1px solid rgba(var(--theme-glass-rgb, 0, 0, 0), 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.defect-responsibility-option input:hover + .defect-responsibility-label {
    background: rgba(var(--theme-glass-rgb, 0, 0, 0), 0.08);
}

.defect-responsibility-option input:checked + .defect-responsibility-label {
    border-color: var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.08);
}

.defect-responsibility-radio {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(var(--theme-glass-rgb, 0, 0, 0), 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.defect-responsibility-option input:checked + .defect-responsibility-label .defect-responsibility-radio {
    border-color: var(--ios-system-orange);
    background: var(--ios-system-orange);
}

.defect-responsibility-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.defect-responsibility-option input:checked + .defect-responsibility-label .defect-responsibility-radio::after {
    opacity: 1;
    transform: scale(1);
}

.defect-responsibility-text {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

/* ============================================ */
/*           PHOTO UPLOAD                       */
/* ============================================ */
.defect-photo-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.defect-photo-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg,
        rgba(255, 149, 0, 0.1),
        rgba(255, 200, 100, 0.1));
    border: 1px dashed rgba(255, 149, 0, 0.4);
    border-radius: 12px;
    color: var(--ios-system-orange);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.defect-photo-btn:hover {
    background: linear-gradient(135deg,
        rgba(255, 149, 0, 0.15),
        rgba(255, 200, 100, 0.15));
    border-color: rgba(255, 149, 0, 0.6);
    transform: translateY(-1px);
}

.defect-photo-btn:active {
    transform: translateY(0);
}

.defect-photo-preview {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(255, 149, 0, 0.3);
    display: none;
}

.defect-photo-preview.has-photo {
    display: block;
}

/* ============================================ */
/*           MODAL FOOTER                       */
/* ============================================ */
.defect-modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(var(--theme-glass-rgb, 0, 0, 0), 0.08);
    background: rgba(var(--theme-glass-rgb, 0, 0, 0), 0.02);
}

.defect-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.defect-btn-cancel {
    background: rgba(var(--theme-glass-rgb, 0, 0, 0), 0.06);
    color: var(--text-secondary);
}

.defect-btn-cancel:hover {
    background: rgba(var(--theme-glass-rgb, 0, 0, 0), 0.1);
    color: var(--text-primary);
}

.defect-btn-save {
    background: linear-gradient(135deg,
        var(--ios-system-orange),
        #FF7A00);
    color: var(--button-text-on-color);
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

.defect-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
}

.defect-btn-save:active {
    transform: translateY(0);
}

.defect-btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================ */
/*           RESPONSIVE                         */
/* ============================================ */
@media (max-width: 480px) {
    .defect-modal {
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
    }

    .defect-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .defect-modal-overlay.open .defect-modal {
        transform: translateY(0);
    }

    .defect-severity-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .defect-severity-card {
        padding: 0.75rem 0.5rem;
    }

    .defect-severity-icon {
        font-size: 1.5rem;
    }
}

/* ============================================ */
/*           DARK THEME ADJUSTMENTS             */
/* ============================================ */
[data-theme="dark"] .defect-modal {
    background: rgba(30, 30, 35, 0.92);
    border-color: rgba(255, 160, 80, 0.15);
}

[data-theme="dark"] .defect-input,
[data-theme="dark"] .defect-textarea,
[data-theme="dark"] .defect-select {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .defect-severity-card,
[data-theme="dark"] .defect-responsibility-label {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .defect-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
}

/**
 * Documents Modal Styles
 */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-container {
    background: var(--glass-thick, rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    color: var(--text-primary);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h2 i {
    color: var(--ios-system-orange);
}

.modal-close-btn {
    background: var(--glass-hover);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: var(--glass-active);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.loader {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
    font-size: 16px;
}

.loader i {
    font-size: 32px;
    color: var(--ios-system-orange);
    margin-bottom: 16px;
    display: block;
}

.error-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--ios-system-red);
    font-size: 16px;
}

.error-message i {
    font-size: 32px;
    margin-bottom: 16px;
    display: block;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-state i {
    color: var(--text-quaternary);
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* Scoped to modals only - prevent overriding main page grid */
.modal .documents-grid,
.modal-content .documents-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-document-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: start;
    transition: all 0.2s ease;
}

.modal-document-card:hover {
    background: var(--glass-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.document-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-secondary);
    border-radius: 8px;
    flex-shrink: 0;
}

.modal-document-card .document-info {
    flex: 1;
    min-width: 0;
}

.modal-document-card .document-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-meta {
    display: flex;
    gap: 1em;
    font-size: 0.8125em;
    color: var(--text-tertiary);
    margin-bottom: 0.375em;
}

.document-meta span {
    display: flex;
    align-items: center;
    gap: 0.375em;
}

.document-description {
    font-size: 0.8125em;
    color: var(--text-secondary);
    margin: 0.5em 0 0 0;
    line-height: 1.5;
}

.document-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* btn-icon styling is defined in modals.css */

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Theme-specific overrides removed — all colors now use theme-aware variables */

/* Responsive */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-document-card {
        flex-direction: column;
    }

    .document-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer button {
        width: 100%;
    }
}

/* ========================================
   BUILDING DOCUMENTS MODAL
   Two-column table layout for documents
   ======================================== */

.building-docs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.building-docs-modal {
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.building-docs-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.building-docs-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.building-docs-body {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.building-docs-table {
    width: 100%;
    border-collapse: collapse;
}

.building-docs-table thead th {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary, rgba(255, 255, 255, 0.45));
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.building-docs-row {
    transition: all 0.2s ease;
}

.building-docs-row:hover {
    background: var(--glass-hover, rgba(255, 255, 255, 0.08));
}

.building-docs-row td {
    padding: 0.75rem 0.5rem;
    vertical-align: top;
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.05));
}

.building-docs-thumb-cell {
    width: 60px;
}

.building-docs-thumb {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-primary, rgba(255, 255, 255, 0.05));
    border-radius: 8px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    overflow: hidden;
}

.building-docs-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.building-docs-info {
    display: flex;
    flex-direction: column;
}

.building-docs-name {
    word-break: break-word;
}

.building-docs-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.building-docs-actions {
    display: flex;
    flex-wrap: wrap;
}

.building-docs-actions .glass-btn {
    white-space: nowrap;
}

.building-docs-actions .text-error {
    color: var(--ios-system-red, #FF3B30);
}

.building-docs-actions .text-error:hover {
    background: rgba(255, 59, 48, 0.1);
}

/* Responsive for building docs modal */
@media (max-width: 640px) {
    .building-docs-modal {
        width: 95%;
        max-height: 90vh;
    }

    .building-docs-header {
        padding: 1rem;
    }

    .building-docs-body {
        padding: 0.75rem 1rem;
    }

    .building-docs-table thead {
        display: none;
    }

    .building-docs-row {
        display: flex;
        flex-direction: column;
        padding: 0.75rem;
        border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    }

    .building-docs-row td {
        display: block;
        padding: 0;
        border: none;
    }

    .building-docs-thumb-cell {
        width: auto;
        margin-bottom: 0.5rem;
    }

    .building-docs-actions {
        margin-top: 0.75rem;
    }
}

/**
 * @file meter-readings-modal.css
 * @filepath public/css/components/meter-readings-modal.css
 * @description Styling for the meter readings modal in properties.html
 *
 * FEATURES:
 * - Full-screen overlay with backdrop blur and glassmorphism
 * - Responsive to sidebar state (shifts right when sidebar is open)
 * - Adapts to different screen sizes (mobile, tablet, desktop)
 * - Max-width 80rem (1280px) on desktop, 90rem on large screens
 * - Hidden by default, displays as flex when `hidden` class is removed
 * - Theme-aware text styling (whitish text in light theme for better contrast)
 *
 * RESPONSIVE BEHAVIOR:
 * - Desktop: Shifts 17.5em to the right when sidebar is open
 * - Tablet: Shifts 15.625em to the right when sidebar is open
 * - Mobile: Always full width (no sidebar offset)
 *
 * THEME BEHAVIOR:
 * - Light Theme: All text in modal is whitish (rgba(255, 255, 255, 0.95))
 * - Includes text, labels, buttons, table content, and form inputs
 * - Placeholders have slightly lower opacity (0.6) for visual hierarchy
 *
 * DEPENDENCIES:
 * - Uses CSS variables: --z-modal-backdrop, --glass-primary, --glass-border
 *
 * @last_updated 2025-11-03
 */

/* Modal Overlay */
.meter-readings-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-backdrop, 9999);
    background: rgba(0, 0, 0, var(--glass-opacity));
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
}

.meter-readings-modal-overlay:not(.hidden) {
    display: flex;
}


/* Modal Content */
.meter-readings-modal-content {
    /* Glass morphism effect */
    background: var(--glass-primary);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;

    /* Sizing */
    width: 100%;
    max-width: 80rem; /* 1280px - 5xl equivalent */
    max-height: 90vh;

    /* Spacing */
    margin: 0 1rem; /* mx-4 equivalent */
    padding: 2rem; /* p-xl equivalent */

    /* Overflow */
    overflow-y: auto;

    /* Shadow */
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Responsive adjustments */

/* Mobile (≤48em / 768px) - No sidebar offset, full width */
@media (max-width: 48em) {
    .meter-readings-modal-overlay {
        left: 0 !important;
        width: 100vw !important;
}

    .meter-readings-modal-content {
        max-width: 100%;
        margin: 0 0.5rem;
        padding: 1.5rem;
        max-height: 95vh;
}
}


/* Large Desktop (≥90em) - Wider modal content */
@media (min-width: 90em) {
    .meter-readings-modal-content {
        max-width: 90rem; /* Even wider on large screens */
}
}

/* ============================================ */
/*             THEME-SPECIFIC STYLING           */
/* ============================================ */

/* Light Theme - Whitish text for better contrast against glass background */
body[data-theme="light"] .meter-readings-modal-content,
body[data-theme="light"] .meter-readings-modal-content *,
body:not([data-theme]) .meter-readings-modal-content,
body:not([data-theme]) .meter-readings-modal-content * {
    color: var(--text-primary) !important;
}

/* Light Theme - Ensure input placeholders are also light */
body[data-theme="light"] .meter-readings-modal-content input::placeholder,
body[data-theme="light"] .meter-readings-modal-content select,
body[data-theme="light"] .meter-readings-modal-content textarea::placeholder,
body:not([data-theme]) .meter-readings-modal-content input::placeholder,
body:not([data-theme]) .meter-readings-modal-content select,
body:not([data-theme]) .meter-readings-modal-content textarea::placeholder {
    color: var(--text-tertiary) !important;
}

/* Light Theme - Table headers and borders */
body[data-theme="light"] .meter-readings-modal-content th,
body:not([data-theme]) .meter-readings-modal-content th {
    color: var(--text-primary) !important;
    border-color: var(--text-quaternary) !important;
}

body[data-theme="light"] .meter-readings-modal-content td,
body:not([data-theme]) .meter-readings-modal-content td {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Light Theme - Buttons */
body[data-theme="light"] .meter-readings-modal-content button,
body:not([data-theme]) .meter-readings-modal-content button {
    color: var(--text-primary) !important;
}

/* Light Theme - Form labels */
body[data-theme="light"] .meter-readings-modal-content label,
body:not([data-theme]) .meter-readings-modal-content label {
    color: var(--text-secondary) !important;
}

/* Theme-aware status message styles */

/* Base status message (light theme) */
.status-message-success {
    background: rgba(16, 185, 129, 0.95);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.status-message-error {
    background: rgba(239, 68, 68, 0.95);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.status-message-warning {
    background: rgba(245, 158, 11, 0.95);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.status-message-info {
    background: rgba(59, 130, 246, 0.95);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

/* Dark theme status messages */
body[data-theme="dark"] .status-message-success {
    background: rgba(16, 185, 129, 0.90);
    color: var(--text-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

body[data-theme="dark"] .status-message-error {
    background: rgba(239, 68, 68, 0.90);
    color: var(--text-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

body[data-theme="dark"] .status-message-warning {
    background: rgba(245, 158, 11, 0.90);
    color: var(--text-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

body[data-theme="dark"] .status-message-info {
    background: rgba(59, 130, 246, 0.90);
    color: var(--text-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}


/**
 * Event Timeline Styles
 */

.timeline-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
}

/* Header */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.timeline-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.timeline-header h2 i {
    color: #667eea;
}

/* Filters */
.timeline-filters {
    margin-bottom: 2rem;
    padding: 1.5rem !important;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.filter-input {
    padding: 0.625rem 1rem;
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    transition: all 0.2s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Timeline Content */
.timeline-content {
    position: relative;
}

.timeline-events {
    position: relative;
    padding-left: 3rem;
}

/* Timeline vertical line */
.timeline-events::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

/* Timeline Item */
.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 0.5rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    z-index: 10;
}

/* Income/Expense markers */
.timeline-item.income .timeline-marker {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.timeline-item.expense .timeline-marker {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Timeline Content Card */
.timeline-content-card {
    flex: 1;
    padding: 1.5rem !important;
}

.timeline-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-date {
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-time {
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
    font-size: 0.75rem;
    color: #667eea;
}

.timeline-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.event-amount {
    font-size: 1.125rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(107, 114, 128, 0.1);
}

.event-amount.income {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.event-amount.expense {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Event Title & Description */
.event-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.event-description {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Event Metadata */
.event-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.event-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
}

.event-meta i {
    color: #667eea;
}

/* Evidence */
.event-evidence {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(107, 114, 128, 0.2);
}

.event-evidence strong {
    display: block;
    margin-bottom: 0.75rem;
    color: #374151;
    font-size: 0.875rem;
}

.evidence-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

.evidence-thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.evidence-thumbnail:hover {
    transform: scale(1.05);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Loader */
.timeline-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 1rem;
}

.timeline-loader i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

/* Load More Button */
.load-more-btn {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn button {
    min-width: 200px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem !important;
}

.empty-state i {
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.75rem 0;
}

.empty-state p {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Buttons */

.btn-text {
    padding: 0.75rem 1rem;
    background: transparent;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-text:hover {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-events {
        padding-left: 2rem;
    }

    .timeline-events::before {
        left: 1rem;
    }

    .timeline-marker {
        left: -2rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .timeline-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .timeline-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Rental Inspection Protocol Modal Styling */

/* Protocol Modal */
.protocol-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.protocol-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Protocol Header */
.protocol-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
}

.protocol-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.protocol-header .subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* Step Progress Bar */
.step-progress {
    display: flex;
    justify-content: space-between;
    padding: 20px 24px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    gap: 8px;
}

.step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: calc(50% + 20px);
    right: calc(-50% + 20px);
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.step-item.active:not(:last-child)::after {
    background: linear-gradient(to right, #667eea, #e5e7eb);
}

.step-item.completed:not(:last-child)::after {
    background: #10b981;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.step-item.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.step-item.completed .step-number {
    background: #10b981;
    color: var(--text-primary);
}

.step-item.completed .step-number::before {
    content: '✓';
}

.step-label {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    font-weight: 500;
}

.step-item.active .step-label {
    color: #667eea;
    font-weight: 600;
}

.step-item.completed .step-label {
    color: #10b981;
}

/* Protocol Body */
.protocol-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

/* Room Condition Section */
.room-conditions {
    margin-top: 20px;
}

.room-condition-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.room-condition-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.room-condition-header input {
    flex: 1;
    margin-right: 12px;
}

.room-condition-header select {
    width: 150px;
}

.room-condition-notes textarea {
    width: 100%;
    margin-top: 8px;
}

.add-room-btn {
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    color: #6b7280;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.add-room-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: #374151;
}

/* Checklist Items */
.checklist-group {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.checklist-group h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
}

.checklist-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.checklist-item label {
    flex: 1;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    color: #4b5563;
}

/* Photo Upload */
.photo-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.photo-upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.photo-upload-area i {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 12px;
}

.photo-upload-area p {
    color: #6b7280;
    margin: 0;
    font-size: 14px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.photo-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 38, 38, 0.9);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Summary Section */
.summary-section {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.summary-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 14px;
}

.summary-value {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

/* Protocol Footer */
.protocol-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.protocol-footer button {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    .protocol-modal {
        padding: 0;
        align-items: flex-end;
    }

    .protocol-modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
    }

    .step-progress {
        overflow-x: auto;
        gap: 4px;
    }

    .step-label {
        font-size: 10px;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/**
 * @file menubar.css
 * @description Lightweight icon-based vertical navigation menubar
 * Replaces the full sidebar with a compact 7em fixed rail
 * Transforms to bottom tab bar on mobile (<=48em)
 *
 * FEATURES:
 * - CSS-only tooltips (overflow: visible on desktop nav)
 * - Active accent via --ios-system-orange (sunset orange, constant across themes)
 * - Fabric tag brand label (vertical "COEUS" between nav and footer)
 * - MPA View Transitions (Chrome 126+, graceful degradation)
 *
 * DEPENDENCIES: coeus-v2.css (theme variables, glass system)
 * VARIANTS: owner (default), vendor (same styles, different links)
 */

/* ============================================ */
/*  MPA VIEW TRANSITIONS                       */
/*  Chrome 126+ / Edge 126+; ignored elsewhere */
/* ============================================ */

@view-transition {
  navigation: auto;
}

/* Root group = html background only (named groups are excluded from root).
   Keep it completely static to prevent background flash between pages. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}

/* Menubar persists across navigations (no animation) */
.menubar {
  view-transition-name: menubar;
}

::view-transition-old(menubar),
::view-transition-new(menubar) {
  animation: none;
}

/* Main content area transitions — only this fades */
body.has-menubar {
  view-transition-name: main-content;
}

::view-transition-old(main-content) {
  animation: vt-content-out 0.12s ease-out both;
}

::view-transition-new(main-content) {
  animation: vt-content-in 0.15s ease-in both;
}

@keyframes vt-content-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes vt-content-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================ */
/*  MENUBAR - DESKTOP (left rail)              */
/* ============================================ */

.menubar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  font-size: 16px; /* Fixed size — immune to --font-scale AND body/page overrides (tools page depth-scale) */
  width: 7em;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75em 0;
  background: var(--glass-primary);
  border-right: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: width 0.2s ease;
  overflow: visible;
}

/* Main flex layout container (migrated from sidebar.css) */
.app-layout {
  display: flex;
  height: 100vh;
}

/* Offset body content for menubar width — fixed px to match menubar's 16px × 7em = 112px */
body.has-menubar {
  padding-left: 112px;
}

/* ============================================ */
/*  FABRIC TAG — crossword monogram            */
/*  Horizontal COEUS (orange) crossed by       */
/*  4 vertical COEUS at O, E, U, S             */
/* ============================================ */

.menubar-fabric-tag {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 1em 0;
  user-select: none;
  pointer-events: none;
  flex-shrink: 1;
  min-height: 0;
  overflow: hidden;
}

/* 10-row × 5-col grid for the crossword pattern */
.fabric-monogram {
  display: grid;
  grid-template-columns: repeat(5, 1em);
  grid-template-rows: repeat(10, 1em);
  place-items: center;
  font-family: var(--font-logo, 'Bodoni Moda', 'Didot', 'Georgia', serif);
}

/* ---- Horizontal COEUS: row 6, accent orange ---- */
.fabric-monogram > span:nth-child(-n+5) {
  grid-row: 6;
  color: var(--ios-system-orange);
  font-size: 0.75em;
  font-weight: 400;
}

.fabric-monogram > span:nth-child(1) { grid-column: 1; }
.fabric-monogram > span:nth-child(2) { grid-column: 2; }
.fabric-monogram > span:nth-child(3) { grid-column: 3; }
.fabric-monogram > span:nth-child(4) { grid-column: 4; }
.fabric-monogram > span:nth-child(5) { grid-column: 5; }

/* ---- Vertical letters: smaller, subtle ---- */
.fabric-monogram > span:nth-child(n+6) {
  color: var(--text-quaternary);
  font-size: 0.5em;
  font-weight: 400;
}

/* Vertical through C (col 1): O E U S */
.fabric-monogram > span:nth-child(6)  { grid-row: 7;  grid-column: 1; }
.fabric-monogram > span:nth-child(7)  { grid-row: 8;  grid-column: 1; }
.fabric-monogram > span:nth-child(8)  { grid-row: 9;  grid-column: 1; }
.fabric-monogram > span:nth-child(9)  { grid-row: 10; grid-column: 1; }

/* Vertical through O (col 2): C E U S */
.fabric-monogram > span:nth-child(10) { grid-row: 5; grid-column: 2; }
.fabric-monogram > span:nth-child(11) { grid-row: 7; grid-column: 2; }
.fabric-monogram > span:nth-child(12) { grid-row: 8; grid-column: 2; }
.fabric-monogram > span:nth-child(13) { grid-row: 9; grid-column: 2; }

/* Vertical through E (col 3): C O U S */
.fabric-monogram > span:nth-child(14) { grid-row: 4; grid-column: 3; }
.fabric-monogram > span:nth-child(15) { grid-row: 5; grid-column: 3; }
.fabric-monogram > span:nth-child(16) { grid-row: 7; grid-column: 3; }
.fabric-monogram > span:nth-child(17) { grid-row: 8; grid-column: 3; }

/* Vertical through U (col 4): C O E S */
.fabric-monogram > span:nth-child(18) { grid-row: 3; grid-column: 4; }
.fabric-monogram > span:nth-child(19) { grid-row: 4; grid-column: 4; }
.fabric-monogram > span:nth-child(20) { grid-row: 5; grid-column: 4; }
.fabric-monogram > span:nth-child(21) { grid-row: 7; grid-column: 4; }

/* Vertical through S (col 5): C O E U */
.fabric-monogram > span:nth-child(22) { grid-row: 2; grid-column: 5; }
.fabric-monogram > span:nth-child(23) { grid-row: 3; grid-column: 5; }
.fabric-monogram > span:nth-child(24) { grid-row: 4; grid-column: 5; }
.fabric-monogram > span:nth-child(25) { grid-row: 5; grid-column: 5; }

/* ============================================ */
/*  NAV ITEMS                                  */
/* ============================================ */

.menubar-nav {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125em;
  padding: 0.25em 0;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: none;
}

.menubar-nav::-webkit-scrollbar {
  display: none;
}

.menubar-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5em;
  height: 3.5em;
  flex-shrink: 0;
  border-radius: 0.75em;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  transition: color 0.35s ease, box-shadow 0.35s ease;
}

.menubar-item:hover {
  color: var(--ios-system-orange);
  background: transparent;
  box-shadow:
    0 0 0.75em rgba(255, 149, 0, 0.25),
    0 0 2em rgba(255, 149, 0, 0.15),
    0 0 3.5em rgba(255, 149, 0, 0.08);
}

.menubar-item.active {
  color: var(--ios-system-orange);
  background: transparent;
  box-shadow:
    0 0 0.5em rgba(255, 149, 0, 0.2),
    0 0 1.5em rgba(255, 149, 0, 0.1);
}


/* ============================================ */
/*  ICONS                                      */
/* ============================================ */

.menubar-icon {
  width: 1.75em;
  height: 1.75em;
  flex-shrink: 0;
  filter: drop-shadow(0 0 0 transparent);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
}

.menubar-item:hover .menubar-icon {
  transform: scale(1.35);
  filter: drop-shadow(0 0 0.4em rgba(255, 149, 0, 0.5));
}

.menubar-item.active .menubar-icon {
  filter: drop-shadow(0 0 0.3em rgba(255, 149, 0, 0.35));
}

/* ============================================ */
/*  LABELS (hidden on desktop, visible mobile) */
/* ============================================ */

.menubar-label {
  display: none;
}

/* ============================================ */
/*  CSS-ONLY TOOLTIPS (desktop)                */
/* ============================================ */

/* CSS pseudo-element tooltips disabled — JS tooltips used instead
   (pseudo-element tooltips clip when .menubar-nav has overflow-y: auto) */

/* JS-powered tooltip (appended to <body> by menubar-enhancer.js) */
.menubar-tooltip {
  position: fixed;
  z-index: 110;
  padding: 0.5em 1em;
  background: var(--glass-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 0.5em;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9375em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.menubar-tooltip.visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 48em) {
  .menubar-tooltip { display: none; }
}

/* ============================================ */
/*  FOOTER (bell + avatar)                     */
/* ============================================ */

.menubar-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25em;
  padding: 0.5em 0 0.25em;
  border-top: 1px solid var(--glass-border);
  overflow: visible;
  flex-shrink: 0;
}

/* Notification bell */
.menubar-bell {
  position: relative;
  overflow: visible;
}

.menubar-badge {
  position: absolute;
  top: -0.125em;
  right: -0.25em;
  z-index: 10;
  min-width: 1.375em;
  height: 1.375em;
  padding: 0 0.3125em;
  background: var(--ios-system-orange);
  color: #fff;
  font-size: 0.6875em;
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.375em;
  text-align: center;
  border-radius: 999px;
  pointer-events: none;
  box-shadow:
    0 0 0.5em rgba(255, 149, 0, 0.6),
    0 0 1.25em rgba(255, 149, 0, 0.35);
  animation: badge-glow 2s ease-in-out infinite alternate;
}

@keyframes badge-glow {
  from { box-shadow: 0 0 0.5em rgba(255, 149, 0, 0.6), 0 0 1.25em rgba(255, 149, 0, 0.35); }
  to   { box-shadow: 0 0 0.625em rgba(255, 149, 0, 0.8), 0 0 1.75em rgba(255, 149, 0, 0.5); }
}

.menubar-badge:empty {
  display: none;
}

/* User avatar */
.menubar-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3em;
  height: 3em;
  border-radius: 50%;
  overflow: hidden;
}

.menubar-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--glass-secondary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.875em;
  font-weight: 600;
  border-radius: 50%;
  line-height: 1;
}

/* ============================================ */
/*  LOGOUT BUTTON                              */
/* ============================================ */

.menubar-logout {
  color: var(--ios-system-red);
}

.menubar-logout:hover {
  color: var(--ios-system-red);
  background: transparent;
  box-shadow:
    0 0 0.75em rgba(255, 59, 48, 0.25),
    0 0 2em rgba(255, 59, 48, 0.15),
    0 0 3.5em rgba(255, 59, 48, 0.08);
}

.menubar-logout:hover .menubar-icon {
  filter: drop-shadow(0 0 0.4em rgba(255, 59, 48, 0.5));
}

/* ============================================ */
/*  NOTIFICATION MODAL                         */
/* ============================================ */

.menubar-notification-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 1em 1em 1em 8em;
}

.menubar-notification-panel {
  width: 22em;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--glass-primary);
  border: 1px solid var(--glass-border);
  border-radius: 0.75em;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 1em;
}

.menubar-notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75em;
}

.menubar-notification-title {
  font-family: var(--font-serif);
  font-size: 1.125em;
  font-weight: 600;
  color: var(--text-primary);
}

.menubar-notification-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75em;
  height: 1.75em;
  border: none;
  background: var(--glass-hover);
  color: var(--text-secondary);
  border-radius: 0.375em;
  cursor: pointer;
  font-size: 1em;
  line-height: 1;
}

.menubar-notification-close:hover {
  color: var(--text-primary);
}

.menubar-notification-item {
  display: block;
  padding: 0.625em;
  border-radius: 0.5em;
  margin-bottom: 0.375em;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s ease;
  cursor: default;
}

.menubar-notification-item[data-target-url] {
  cursor: pointer;
}

.menubar-notification-item:hover {
  background: var(--glass-hover);
}

/* Unread indicator — left accent border + slightly brighter background */
.menubar-notification-item.menubar-notification-unread {
  border-left: 0.1875em solid var(--ios-system-orange);
  background: var(--glass-primary);
}

.menubar-notification-item-title {
  font-family: var(--font-sans);
  font-size: 0.8125em;
  font-weight: 500;
  margin-bottom: 0.125em;
}

.menubar-notification-item-body {
  font-family: var(--font-sans);
  font-size: 0.75em;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menubar-notification-item-time {
  font-family: var(--font-sans);
  font-size: 0.6875em;
  color: var(--text-tertiary);
  margin-top: 0.25em;
}

.menubar-notification-empty {
  padding: 2em 1em;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.8125em;
  color: var(--text-tertiary);
}

/* ============================================ */
/*  CHAT HISTORY MODAL                         */
/* ============================================ */

.menubar-history-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 1em 1em 1em 8em;
}

.menubar-history-panel {
  width: 24em;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--glass-primary);
  border: 1px solid var(--glass-border);
  border-radius: 0.75em;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
}

.menubar-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875em 1em;
  border-bottom: 1px solid var(--glass-border);
}

.menubar-history-title {
  font-family: var(--font-serif);
  font-size: 1.125em;
  font-weight: 600;
  color: var(--text-primary);
}

.menubar-history-actions {
  display: flex;
  align-items: center;
  gap: 0.375em;
}

.menubar-history-search {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 0.75em;
  border-bottom: 1px solid var(--glass-border);
}

.menubar-history-search-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.menubar-history-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8125em;
  outline: none;
}

.menubar-history-search-input::placeholder {
  color: var(--text-tertiary);
}

.menubar-history-new,
.menubar-history-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75em;
  height: 1.75em;
  border: none;
  background: var(--glass-hover);
  color: var(--text-secondary);
  border-radius: 0.375em;
  cursor: pointer;
  font-size: 1em;
  line-height: 1;
}

.menubar-history-new:hover,
.menubar-history-close:hover {
  color: var(--text-primary);
}

.menubar-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5em;
  scrollbar-width: thin;
}

.menubar-history-item {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 0.625em;
  border-radius: 0.5em;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
}

.menubar-history-item:hover {
  background: var(--glass-hover);
}

.menubar-history-item-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.menubar-history-item-title {
  flex: 1;
  font-size: 0.8125em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menubar-history-item-actions {
  display: flex;
  align-items: center;
  gap: 0.125em;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.menubar-history-item:hover .menubar-history-item-actions {
  opacity: 1;
}

.menubar-history-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1.5em;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: 0.25em;
  cursor: pointer;
  padding: 0;
}

.menubar-history-action-btn:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
}

.menubar-history-action-btn.menubar-delete-btn:hover {
  color: var(--ios-system-red);
}

.menubar-history-action-btn svg {
  width: 0.875em;
  height: 0.875em;
}

.menubar-history-empty {
  padding: 3em 1em;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.8125em;
  color: var(--text-tertiary);
}

/* ============================================ */
/*  MOBILE - Bottom tab bar (<=48em)           */
/* ============================================ */

@media (max-width: 48em) {
  .menubar {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4em;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--glass-border);
  }

  body.has-menubar {
    padding-left: 0;
    padding-bottom: 64px; /* Match menubar mobile height: 16px × 4em = 64px */
  }


  .menubar-fabric-tag {
    display: none;
  }

  .menubar-nav {
    flex: 0 1 auto;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0;
    overflow: visible;
  }

  .menubar-item {
    width: auto;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1875em;
    padding: 0.25em 0.5em;
    border-radius: 0;
  }


  .menubar-icon {
    width: 1.375em;
    height: 1.375em;
  }

  .menubar-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    line-height: 1;
    text-align: center;
    color: inherit;
  }

  /* On mobile, show max 5 nav items; hide overflow */
  .menubar-nav .menubar-item:nth-child(n+6) {
    display: none;
  }

  .menubar-footer {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 0;
    padding: 0;
    border-top: none;
    border-left: 1px solid var(--glass-border);
  }

  .menubar-avatar {
    width: 2em;
    height: 2em;
  }

  .menubar-logout {
    display: none;
  }

  /* Notification panel on mobile */
  .menubar-notification-overlay {
    padding: 1em;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 5em;
  }

  .menubar-notification-panel {
    width: 100%;
    max-width: 24em;
  }

  /* Chat history panel on mobile */
  .menubar-history-overlay {
    padding: 1em;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 5em;
  }

  .menubar-history-panel {
    width: 100%;
    max-width: 24em;
    max-height: 70vh;
  }
}

/**
 * COEUS DESIGN SYSTEM - NAVIGATION COMPONENT
 *
 * PURPOSE:
 * Unified navigation styling matching the user profile button design.
 * All navigation items, page links, and the "New Chat" button now share
 * the same glass aesthetic with rounded corners (12px) and subtle borders.
 *
 * FEATURES:
 * - Consistent glass button styling across all navigation elements
 * - Rounded corners (12px, not pill-shaped) like user profile button
 * - Default glass background: rgba(255, 255, 255, 0.05)
 * - Border: 1px solid rgba(255, 255, 255, 0.1)
 * - Hover effects with brightened background and translateY
 * - Active state with stronger glass effect
 * - Theme-aware colors (Light, Dark, Colors)
 * - Responsive sizing using em units (not rem)
 * - Smooth transitions with cubic-bezier easing
 *
 * STYLING CONSISTENCY:
 * All buttons (.nav-item, .new-chat-btn, .user-profile-btn) now share:
 * - Same border-radius (12px)
 * - Same base glass effect
 * - Same hover/active behavior
 * - Same theme variations
 *
 * DEPENDENCIES:
 * - core/variables.css (CSS variables)
 * - core/themes.css (theme switching)
 * - components/sidebar.css (user profile button reference)
 *
 * USAGE:
 * <button class="nav-item active">
 *   <svg class="nav-item-icon">...</svg>
 *   <span>Navigation</span>
 * </button>
 *
 * <button class="new-chat-btn">
 *   <svg>+</svg>
 *   <span>Neuer Chat</span>
 * </button>
 *
 * LAST UPDATED: 2025-10-30
 * VERSION: 2.0.0
 */

/* ============================================ */
/*          NAVIGATION ITEMS (Sidebar)          */
/* ============================================ */

/* Navigation items styled like user profile button */

/* Hover State - Like user profile button */


/* Navigation items - Base class */
.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75em;
    padding: 0.75em;
    font-size: 0.95em;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, var(--glass-opacity));
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
    transform: translateY(-1px);
}

/* Active State - Sunset orange indicator */
.nav-item.active {
    background: rgba(255, 255, 255, var(--glass-opacity));
    border-color: rgba(249, 115, 22, 0.5);
    border-left: 3px solid #f97316;
}

/* Hide text labels inside sidebar nav items - tooltip handles hover text */
.sidebar .nav-item span {
    display: none;
}

/* Nav item icon */
.nav-item-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ============================================ */
/*          CHAT HISTORY ITEMS                  */
/* ============================================ */

/* Chat History Items - Removed - now using chat-history-item in sidebar.css */

/* ============================================ */
/*          CHAT DELETE BUTTON                  */
/* ============================================ */

.delete-button {
    opacity: 0;
    transition: opacity 0.2s ease;
    position: absolute;
    right: 0.5em;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25em;
    background: var(--ios-glass-thin);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--ios-system-red);
}

.chat-item:hover .delete-button {
    opacity: 1;
}

.delete-button:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Chat delete button - appears on hover */
.chat-item:hover .chat-delete-btn {
    opacity: 1 !important;
}

.chat-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* ============================================ */
/*          LIQUID GLASS BUTTON (Universal)     */
/* ============================================ */

/* Liquid glass button class - now using simple glass like user profile button */
.liquid-glass-btn {
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.liquid-glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.liquid-glass-btn:active {
    transform: translateY(0);
}

/* ============================================ */
/*          NEW CHAT BUTTON                     */
/* ============================================ */

.new-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75em;
    margin: 0;
    padding: 1.25em 1.5em;  /* Increased vertical padding for more prominence */
    font-size: 1em;
    font-weight: 500;
    width: 100%;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid transparent;
    border-radius: 12px;
    background-clip: padding-box;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

/* Sidebar scrollable area */
.sidebar .flex-1.overflow-y-auto {
    padding: 5px;
    margin: 0;
}

/* Orange gradient stroke */
.new-chat-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg,
        rgba(249, 115, 22, 0.6),
        rgba(251, 146, 60, 0.4),
        rgba(249, 115, 22, 0.6)
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.new-chat-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(249, 115, 22, 0.2);
}

.new-chat-btn:hover::before {
    background: linear-gradient(135deg,
        rgba(249, 115, 22, 0.8),
        rgba(251, 146, 60, 0.6),
        rgba(249, 115, 22, 0.8)
    );
}

.new-chat-btn:active {
    transform: translateY(0);
}

/* ============================================ */
/*          THEME OVERRIDES                     */
/* ============================================ */

/* Dark Theme - Navigation Items */
body[data-theme="dark"] .nav-item,
body.theme-dark .nav-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .nav-item:hover,
body.theme-dark .nav-item:hover {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
}

body[data-theme="dark"] .nav-item.active,
body.theme-dark .nav-item.active {
    background: rgba(255, 255, 255, var(--glass-opacity));
    border-color: rgba(249, 115, 22, 0.5);
    border-left: 3px solid #f97316;
}

/* Light Theme - Sidebar Navigation needs lighter text
   The sidebar always uses dark glass background, so text must be light */
html[data-theme="light"] .sidebar .nav-item,
body[data-theme="light"] .sidebar .nav-item,
body.theme-light .sidebar .nav-item {
    color: rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] .sidebar .nav-item:hover,
body[data-theme="light"] .sidebar .nav-item:hover,
body.theme-light .sidebar .nav-item:hover {
    color: rgba(255, 255, 255, 0.95);
}

html[data-theme="light"] .sidebar .nav-item.active,
body[data-theme="light"] .sidebar .nav-item.active,
body.theme-light .sidebar .nav-item.active {
    color: rgba(255, 255, 255, 1);
}

html[data-theme="light"] .sidebar .nav-item-icon,
body[data-theme="light"] .sidebar .nav-item-icon,
body.theme-light .sidebar .nav-item-icon {
    color: rgba(255, 255, 255, 0.85);
    stroke: rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] .sidebar .nav-item:hover .nav-item-icon,
body[data-theme="light"] .sidebar .nav-item:hover .nav-item-icon,
body.theme-light .sidebar .nav-item:hover .nav-item-icon {
    color: rgba(255, 255, 255, 0.95);
    stroke: rgba(255, 255, 255, 0.95);
}

/* Light Modern Theme - Sidebar Navigation needs lighter text
   The sidebar always uses dark glass background, so text must be light */
html[data-theme="lightmodern"] .sidebar .nav-item,
body[data-theme="lightmodern"] .sidebar .nav-item {
    color: rgba(255, 255, 255, 0.85);
}

html[data-theme="lightmodern"] .sidebar .nav-item:hover,
body[data-theme="lightmodern"] .sidebar .nav-item:hover {
    color: rgba(255, 255, 255, 0.95);
}

html[data-theme="lightmodern"] .sidebar .nav-item.active,
body[data-theme="lightmodern"] .sidebar .nav-item.active {
    color: rgba(255, 255, 255, 1);
}

html[data-theme="lightmodern"] .sidebar .nav-item-icon,
body[data-theme="lightmodern"] .sidebar .nav-item-icon {
    color: rgba(255, 255, 255, 0.85);
    stroke: rgba(255, 255, 255, 0.85);
}

html[data-theme="lightmodern"] .sidebar .nav-item:hover .nav-item-icon,
body[data-theme="lightmodern"] .sidebar .nav-item:hover .nav-item-icon {
    color: rgba(255, 255, 255, 0.95);
    stroke: rgba(255, 255, 255, 0.95);
}

/* ============================================ */
/*          NAV ITEM TOOLTIP                    */
/* ============================================ */

/* Tooltip container attached to body, positioned via JS */
.nav-tooltip {
    position: fixed;
    z-index: 9999;
    padding: 0.5em 1em;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(249, 115, 22, 0.4);
    border-radius: 0.5em;
    color: rgba(255, 255, 255, 0.95);
    font-family: var(--font-sans, 'Noto Sans JP', sans-serif);
    font-size: 1em;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-0.5em);
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.15),
                0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-tooltip.visible {
    opacity: 1;
    transform: translateX(0);
}

/**
 * END NAVIGATION COMPONENT
 *
 * NOTES:
 * - Uses CSS variables for consistent theming
 * - Liquid glass effect with multiple gradient layers
 * - Theme-aware with Light, Dark, Colors support
 * - Smooth transitions for better UX
 * - Z-index layering for proper element stacking
 */

/**
 * COEUS DESIGN SYSTEM - USER PROFILE COMPONENT
 *
 * PURPOSE:
 * User profile button component with avatar, user info, and glassmorphism effect.
 * Positioned at the bottom of the sidebar with responsive sizing.
 *
 * FEATURES:
 * - Liquid glass background effect
 * - Circular gradient avatar with initials
 * - Responsive text truncation
 * - Theme-aware colors (Light, Dark, Colors)
 * - Mobile/tablet/desktop responsive sizing
 * - Smooth hover effects
 *
 * DEPENDENCIES:
 * - core/variables.css (CSS variables)
 * - core/themes.css (theme switching)
 * - core/typography.css (text styles)
 *
 * USAGE:
 * <div class="liquid-glass-btn user-profile-btn" onclick="...">
 *   <div class="user-avatar">AM</div>
 *   <div class="user-info">
 *     <div class="text-callout font-medium text-primary">Angad Manik</div>
 *     <div class="text-caption1 text-tertiary">Administrator</div>
 *   </div>
 *   <svg>...</svg>
 * </div>
 *
 * CREATED: 2025-10-26
 * VERSION: 1.0.0
 */

/* ============================================ */
/*          USER PROFILE BUTTON                 */
/* ============================================ */
/* NOTE: .user-profile-btn and .user-avatar for SIDEBAR are defined in sidebar.css
   The styles below are ONLY for the user-profile.html PAGE (not sidebar) */

/* User profile PAGE specific container - scoped to avoid sidebar conflict */
.page-user-profile .profile-header .user-profile-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.75rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2),
                0 2px 4px rgba(0, 0, 0, 0.12);
    border-radius: 27px;
    transition: all 0.2s ease;
    gap: 0.75rem;
    box-sizing: border-box;
    overflow: hidden;
}

/* User profile PAGE avatar - scoped to avoid sidebar conflict */
.page-user-profile .profile-header .user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--font-callout);
    flex-shrink: 0;
}

/* ============================================ */
/*          USER INFO                           */
/* ============================================ */

.user-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.user-info > div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================ */
/*          THEME OVERRIDES                     */
/* ============================================ */

/* Dark Theme - Text */
body[data-theme="dark"] .text-callout,
body.theme-dark .text-callout {
    color: rgba(245, 241, 232, 0.95) !important;
}

/* ============================================ */
/*          RESPONSIVE SIZING                   */
/* ============================================ */

/* Mobile: Smaller user profile button - scoped to profile page */
@media (max-width: 768px) {
    .page-user-profile .profile-header .user-profile-btn {
        padding: 0.625rem;
        gap: 0.5rem;
    }

    .page-user-profile .profile-header .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
}

/* Tablet: Medium-sized user profile button - scoped to profile page */
@media (min-width: 769px) and (max-width: 1024px) {
    .page-user-profile .profile-header .user-profile-btn {
        padding: 0.625rem;
        gap: 0.625rem;
    }

    .page-user-profile .profile-header .user-avatar {
        width: 38px;
        height: 38px;
    }
}

/**
 * END USER PROFILE COMPONENT
 *
 * NOTES:
 * - Uses CSS variables for consistent theming
 * - Gradient avatar for visual appeal
 * - Text truncation prevents overflow
 * - Responsive sizing for all devices
 * - Theme-aware with Light, Dark, Colors support
 */

/**
 * COEUS DESIGN SYSTEM - USER PROFILE PAGE COMPONENT
 *
 * PURPOSE:
 * User profile page specific styles with glassmorphism effects
 * - Glass header navigation with theme-responsive transparency
 * - User information cards with theme-aware styling
 * - Automatic theme adaptation via CSS variables
 *
 * FEATURES:
 * - Transparent glass header with backdrop blur
 * - Theme-responsive colors (light/dark/modern variants)
 * - No hardcoded colors (uses CSS variables from themes.css)
 * - Theme selector buttons with full background images
 * - White text with shadow overlay for readability
 * - Unified backlit lamp glow effect across ALL interactive elements
 * - Glassmorphism design for usage/token cards
 * - NO INLINE STYLES (utility classes only)
 * - High-specificity CSS for authentication section buttons (always white text)
 * - Transparent passkey action button backgrounds with inline SVG icons
 * - Maximum CSS specificity (1,2,1) for icon button override
 *
 * THEME SELECTOR:
 * Each theme button displays the actual background image as container background
 * with semi-transparent gradient overlay and white text for optimal contrast
 *
 * UNIFIED GLOW EFFECTS:
 * ALL interactive elements share the same modern orangish backlit glow:
 * - Navigation items (.nav-menu-item)
 * - Theme buttons (.theme-option)
 * - Font size buttons (.font-size-option)
 * - Model selectors (.model-option)
 * - Token usage cards (.token-usage-card)
 *
 * Hover State: Subtle outer glow (20px/40px radius)
 * Active State: Strong multi-layer glow (30px/60px radius) + inset bottom glow
 * Border: 3px solid rgba(255, 255, 255, 0.2) with glass background
 *
 * CSS SPECIFICITY HIERARCHY (followed strictly):
 * - #passkey-list .passkey-actions button.icon-btn (1,2,1) - Maximum specificity for icon buttons
 * - #section-auth .btn-secondary (1,1,0) - Authentication buttons always white text
 * - .icon-btn (0,1,0) - Base icon button styling
 * - .btn-secondary (0,1,0) - Base button styling
 *
 * ICON BUTTON STRATEGY:
 * Uses inline SVG icons with stroke="currentColor" for theme-responsive coloring.
 * Maximum CSS specificity ensures transparent backgrounds override all conflicts.
 *
 * DEPENDENCIES: themes.css, variables.css
 * LAST UPDATED: 2025-11-04
 * VERSION: 1.7.0
 */

/* User profile specific styles */
body {
    margin: 0;
    padding: 0;
    background: transparent;
    min-height: 100vh;
}

/* Navigation Header - Glass Effect */
.profile-nav-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-secondary);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 0;
    margin-bottom: 32px;
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all var(--transition-base);
}

/* Header text colors - Use theme variables */
.profile-nav-header .nav-title {
    color: var(--text-primary);
}

.profile-nav-header .nav-btn-secondary {
    color: var(--text-primary);
}

.profile-nav-header .nav-btn-primary {
    color: var(--text-primary);
}

/* Theme-specific colors for design section elements */
/* Light theme - Charcoal blue text */
body[data-theme="light"] .design-label,
body.theme-light .design-label {
    color: rgba(44, 62, 80, 0.85) !important;
}

body[data-theme="light"] .font-size-option,
body.theme-light .font-size-option {
    color: var(--text-primary);
}

body[data-theme="light"] .model-name,
body.theme-light .model-name {
    color: rgba(44, 62, 80, 0.85) !important;
}

body[data-theme="light"] .model-desc,
body.theme-light .model-desc {
    color: rgba(44, 62, 80, 0.60) !important;
}

body[data-theme="light"] .design-subsection small,
body.theme-light .design-subsection small {
    color: rgba(44, 62, 80, 0.60) !important;
}

/* Dark theme - Dark text for better readability on glass cards */
body[data-theme="dark"] .design-label,
body.theme-dark .design-label {
    color: rgba(30, 30, 35, 0.95) !important;
}

body[data-theme="dark"] .font-size-option,
body.theme-dark .font-size-option {
    color: var(--text-primary);
}

body[data-theme="dark"] .model-name,
body.theme-dark .model-name {
    color: rgba(30, 30, 35, 0.95) !important;
}

body[data-theme="dark"] .model-desc,
body.theme-dark .model-desc {
    color: rgba(30, 30, 35, 0.75) !important;
}

body[data-theme="dark"] .design-subsection small,
body.theme-dark .design-subsection small {
    color: rgba(30, 30, 35, 0.75) !important;
}

/* Ensure active states keep white text on colored backgrounds */
.theme-option.active span,
.theme-option.active i,
.font-size-option.active,
.model-option.active .model-name,
.model-option.active .model-desc {
    color: var(--text-primary) !important;
}

.profile-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.nav-btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.nav-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.nav-btn-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-primary);
    border: 2px solid rgba(107, 114, 128, 0.2);
}

.nav-btn-secondary:hover {
    background: rgba(107, 114, 128, 0.15);
    transform: translateY(-2px);
}

.nav-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Improved Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px 48px 32px;
}

/* Improved Glass Cards */

/* Profile Header Improvements */
.profile-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 32px 0;
}

/* Info Grid Improvements */
.info-grid {
    display: grid;
    grid-template-columns: 40% 60%; /* Left sidebar 40%, Right content 60% */
    gap: 1.5em;
    margin-bottom: 1.5em;
    padding-top: 1.5em; /* Proper spacing from header */
    align-items: start;
}

/* Theme Selector - Desktop: Wider landscape cards with background previews */
.theme-selector {
    display: grid;
    grid-template-columns: 1fr; /* Stack vertically */
    gap: 0.75em;
}

.theme-option {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 1em 1.5em;
    min-height: 60px;
    aspect-ratio: 3 / 1; /* Landscape shape - 3:1 ratio */
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* Background images for each theme */
.theme-option[data-theme="light"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), url('/assets/light.jpg');
}

.theme-option[data-theme="lightmodern"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), url('/assets/lightmodern.jpg');
}

.theme-option[data-theme="dark"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('/assets/dark.jpg');
}

.theme-option[data-theme="darkart"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('/assets/darkart.jpg');
}

.theme-option[data-theme="darkmodern"] {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('/assets/darkmodern.jpg');
}

/* No icon styles - icons removed */
.theme-option i {
    display: none;
}

/* Text styling - clean white text */
.theme-option span {
    color: var(--text-primary);
    font-weight: 400;
    font-size: 1.125rem;
    z-index: 1;
    position: relative;
}

.theme-option:hover {
    border-color: rgba(255, 140, 50, 0.3);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 0 20px rgba(255, 120, 40, 0.4),
        0 0 40px rgba(255, 100, 30, 0.2);
}

.theme-option.active {
    border: 1px solid rgba(255, 140, 50, 0.4);
    box-shadow:
        0 0 30px rgba(255, 120, 40, 0.6),
        0 0 60px rgba(255, 100, 30, 0.4),
        inset 0 -2px 20px rgba(255, 140, 50, 0.3);
    transform: translateY(-2px) scale(1.02);
}

/* Mobile: Single column stacking */
@media (max-width: 48em) { /* 768px = 48em */
    .info-grid {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
        gap: 1em;
        padding-top: 1em;
    }
}

/* Left Navigation Sidebar (40%) - Desktop - Dark Glass */
.nav-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-radius: 1em;
    padding: 1em;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Navigation Menu Items - Dark Glass */
.nav-menu-item {
    display: flex;
    align-items: center;
    padding: 0.875em 1em;
    border-radius: 0.75em;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.nav-menu-item.active {
    background: linear-gradient(135deg, rgba(255, 140, 50, 0.25), rgba(255, 100, 30, 0.25));
    color: var(--text-primary);
    border: 1px solid rgba(255, 140, 50, 0.4);
    box-shadow:
        0 0 30px rgba(255, 120, 40, 0.6),
        0 0 60px rgba(255, 100, 30, 0.4),
        inset 0 -2px 20px rgba(255, 140, 50, 0.3);
}

.nav-menu-item.active .nav-title,
.nav-menu-item.active .nav-title i {
    color: var(--text-primary) !important;
}

.nav-menu-item .nav-title {
    display: flex;
    align-items: center;
    gap: 0.75em;
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-menu-item .nav-title i {
    color: var(--text-primary);
}

/* Right Content Area (60%) - Desktop - Dark Glass */
.content-area {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 1em;
    padding: 2em;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-height: 400px;
}

/* Content Sections - Hide all, show only active */
.content-section {
    display: none;
}

.content-section.active {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Section Titles */
.section-title {
    margin-bottom: 24px;
    font-size: 18px;
}

/* Info Rows */
.info-row {
    padding: 16px 0;
}

/* Storage Bar Chart */
.storage-bar-chart {
    gap: 20px;
}

/* Button Group */
.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

/* Token Usage Styles */
.period-selector {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 10px;
}

.period-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.period-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.token-usage-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.token-usage-card:hover {
    border-color: rgba(255, 140, 50, 0.3);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 0 20px rgba(255, 120, 40, 0.4),
        0 0 40px rgba(255, 100, 30, 0.2);
}

.token-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.token-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.token-stat-primary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.token-count {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.token-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.token-cost {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.cost-amount {
    font-size: 20px;
    font-weight: 700;
    color: #f97316;
}

.cost-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.token-stat-secondary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 13px;
    color: var(--text-secondary);
}

.token-stat-secondary span:first-child {
    font-weight: 700;
    color: var(--text-primary);
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.service-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}

.service-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-primary);
}

.service-details h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.service-details p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.service-stats {
    text-align: right;
}

.service-tokens {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.service-cost {
    font-size: 13px;
    color: #f97316;
    font-weight: 600;
}

/* AI Model Selector Styles */
.model-selector {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.model-option {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.model-option:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 140, 50, 0.3);
    box-shadow:
        0 0 20px rgba(255, 120, 40, 0.4),
        0 0 40px rgba(255, 100, 30, 0.2);
}

.model-option.active {
    background: linear-gradient(135deg, rgba(255, 140, 50, 0.25), rgba(255, 100, 30, 0.25));
    border: 1px solid rgba(255, 140, 50, 0.4);
    box-shadow:
        0 0 30px rgba(255, 120, 40, 0.6),
        0 0 60px rgba(255, 100, 30, 0.4),
        inset 0 -2px 20px rgba(255, 140, 50, 0.3);
}

.model-option.active .model-name,
.model-option.active .model-desc {
    color: var(--text-primary);
}

.model-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.model-desc {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Currency Selector (Währung) */
.currency-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.currency-option {
    padding: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.currency-option:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 140, 50, 0.3);
    box-shadow:
        0 0 20px rgba(255, 120, 40, 0.4),
        0 0 40px rgba(255, 100, 30, 0.2);
}

.currency-option.active {
    background: linear-gradient(135deg, rgba(255, 140, 50, 0.25), rgba(255, 100, 30, 0.25));
    border: 1px solid rgba(255, 140, 50, 0.4);
    box-shadow:
        0 0 30px rgba(255, 120, 40, 0.6),
        0 0 60px rgba(255, 100, 30, 0.4),
        inset 0 -2px 20px rgba(255, 140, 50, 0.3);
}

.currency-option.active .currency-code,
.currency-option.active .currency-name {
    color: var(--text-primary);
}

.currency-code {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.currency-name {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Font Size Selector - Desktop: Vertical stack with better styling */
.font-size-selector {
    display: grid;
    grid-template-columns: 1fr; /* Stack vertically */
    gap: 0.75em;
}

.font-size-option {
    padding: 1em 1.5em;
    min-height: 50px;
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
}

.font-size-option:hover {
    border-color: rgba(255, 140, 50, 0.3);
    transform: translateY(-2px) scale(1.01);
    box-shadow:
        0 0 20px rgba(255, 120, 40, 0.4),
        0 0 40px rgba(255, 100, 30, 0.2);
}

.font-size-option.active {
    border: 1px solid rgba(255, 140, 50, 0.4);
    box-shadow:
        0 0 30px rgba(255, 120, 40, 0.6),
        0 0 60px rgba(255, 100, 30, 0.4),
        inset 0 -2px 20px rgba(255, 140, 50, 0.3);
    transform: translateY(-2px) scale(1.01);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .profile-nav-container {
        padding: 0 16px;
        flex-wrap: wrap;
    }

    .nav-title {
        font-size: 16px;
    }

    .nav-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .main-container {
        padding: 0 12px 32px 12px;
    }

    

    .profile-header {
        padding: 20px 0;
        margin-bottom: 24px;
    }

    /* .info-grid mobile styles already defined above with responsive media query */

    /* Mobile: Navigation as horizontal scrollable tabs */
    .nav-sidebar {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 8px !important;
        padding: 8px 4px !important;
        background: transparent !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    /* Hide scrollbar for webkit browsers */
    .nav-sidebar::-webkit-scrollbar {
        display: none;
    }

    /* Mobile: Compact horizontal navigation tabs */
    .nav-menu-item {
        flex: 0 0 auto !important;
        min-width: 140px !important;
        max-width: 160px !important;
        height: 44px !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
        /* Glass effect */
        background: rgba(255, 255, 255, 0.4) !important;
        backdrop-filter: blur(20px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
        border-radius: 12px !important;
        transition: all 0.2s ease !important;
    }

    .nav-menu-item.active {
        background: rgba(255, 255, 255, 0.65) !important;
        transform: scale(1.02);
    }

    .nav-menu-item .nav-title {
        font-size: 13px !important;
        gap: 6px !important;
        justify-content: center !important;
        flex-direction: row !important;
        text-align: center !important;
        align-items: center !important;
        white-space: nowrap !important;
    }

    .nav-menu-item .nav-title i {
        font-size: 16px !important;
        margin-right: 4px !important;
    }

    /* Mobile: Content area optimized */
    .content-area {
        width: calc(100% - 16px) !important;
        max-width: 600px;
        margin: 0 auto !important;
        padding: 20px 16px !important;
        min-height: auto !important;
        /* Glass effect */
        background: rgba(255, 255, 255, 0.5) !important;
        backdrop-filter: blur(30px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
        border-radius: 16px !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    }

    /* Mobile: Section titles smaller */
    .content-area .section-title {
        font-size: 20px !important;
        margin-bottom: 16px !important;
    }

    /* Mobile: Subsection styling */
    .design-subsection {
        margin-bottom: 20px !important;
    }

    .design-label {
        font-size: 14px !important;
        margin-bottom: 10px !important;
    }

    /* Mobile: Hide inactive content sections */
    .content-section {
        display: none !important;
    }

    .content-section.active {
        display: flex !important;
        flex-direction: column;
        gap: var(--spacing-md);
    }

    /* Mobile: Theme selector - compact grid */
    .theme-selector {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    .theme-option {
        padding: 14px 10px !important;
        height: auto !important;
        min-height: 70px !important;
        background: rgba(255, 255, 255, 0.45) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        border-radius: 12px !important;
    }

    .theme-option i {
        font-size: 1.5rem !important;
        margin-bottom: 4px !important;
    }

    .theme-option span {
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    /* Mobile: Font size selector - vertical stack */
    .font-size-selector {
        display: grid !important;
        grid-template-columns: 1fr !important; /* Stack vertically */
        gap: 0.75em !important;
    }

    .font-size-option {
        padding: 1em 1.5em !important;
        min-height: 50px !important;
        border-radius: 12px !important;
        border: 3px solid rgba(255, 255, 255, 0.2) !important;
        background: rgba(255, 255, 255, 0.15) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        text-align: left !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Mobile: AI Model selector - vertical stack */
    .model-selector {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .model-option {
        padding: 14px 14px !important;
        min-height: 65px !important;
        background: rgba(255, 255, 255, 0.45) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        border-radius: 12px !important;
    }

    .model-name {
        font-size: 15px !important;
        font-weight: 600 !important;
        margin-bottom: 2px !important;
    }

    .model-desc {
        font-size: 12px !important;
        opacity: 0.8 !important;
    }

    /* Mobile: Section titles */
    .section-title {
        font-size: 18px;
    }

    .period-selector {
        flex-wrap: wrap;
    }

    .period-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .service-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .service-stats {
        text-align: left;
        width: 100%;
    }

    /* Mobile: Info rows */
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 0;
    }

    .info-label {
        font-size: 13px;
        font-weight: 600;
    }

    .info-value {
        font-size: 14px;
    }
}

/* =============================================================================
   AUTHENTICATION SECTION - BUTTON OVERRIDES (HIGH SPECIFICITY)
   ============================================================================= */

/**
 * Email & Password Section Button Styling
 *
 * SPECIFICITY: ID + class selector (1,1,0) overrides .btn-secondary (0,1,0)
 *
 * ALWAYS white/light text on buttons regardless of theme:
 * - Light themes: White text on semi-transparent buttons
 * - Dark themes: White text remains consistent
 *
 * This ensures buttons always have proper contrast and readability
 */
#section-auth 

#section-auth 

/**
 * ========================================
 * Passkey Section - Icon & Button Styling
 * ========================================
 *
 * PURPOSE: Transparent icon backgrounds with theme-responsive colors
 *
 * SPECIFICITY STRATEGY:
 * - Base .icon-btn: (0,1,0) - fallback styles
 * - #passkey-list .passkey-actions button.icon-btn: (1,2,1) - maximum override
 *
 * IMPORTANT: Uses maximum specificity (element + ID + 2 classes) to override
 * any conflicting styles from other CSS files or browser defaults
 */

/* Passkey Icon Container */
.passkey-icon {
    width: 48px;
    height: 48px;
    background: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.5rem;
}

/* Base Icon Button Styles (0,1,0) */
.icon-btn {
    padding: 0.5rem;
    border-radius: 8px;
    border: none;
    background: transparent !important;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.icon-btn:hover {
    background: var(--glass-hover) !important;
    color: var(--text-primary);
}

.icon-btn.danger {
    background: transparent !important;
    color: #ef4444;
}

.icon-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Passkey Action Buttons - Maximum Specificity (1,2,1) - element + ID + 2 classes */
/**
 * CRITICAL: This selector has the highest possible specificity without using
 * multiple IDs or inline styles. It overrides all other CSS rules.
 *
 * Breakdown:
 * - button (element) = 1
 * - #passkey-list (ID) = 1
 * - .passkey-actions (class) = 1
 * - .icon-btn (class) = 1
 * Total: (1,2,1)
 *
 * All three background properties are set to ensure complete override:
 * - background: covers shorthand property
 * - background-color: covers specific color property
 * - background-image: covers any gradient/image backgrounds
 */
#passkey-list .passkey-actions button.icon-btn {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

#passkey-list .passkey-actions button.icon-btn:hover {
    background: var(--glass-hover) !important;
    background-color: var(--glass-hover) !important;
    background-image: none !important;
}

#passkey-list .passkey-actions button.icon-btn.danger {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: #ef4444;
}

#passkey-list .passkey-actions button.icon-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
    background-image: none !important;
}

/* SVG Icons inside buttons - inherit color from parent */
.icon-btn svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =============================================================================
   FORM INPUTS - THEME-AWARE STYLING
   ============================================================================= */

/**
 * Organization Info Modal Form Inputs
 *
 * PURPOSE: Theme-responsive form inputs for the organization info modal
 * Uses CSS variables for automatic theme adaptation across all 5 themes:
 * - Light, Light Modern, Dark, Dark Art, Dark Modern, Colors
 *
 * SPECIFICITY: Class selector (0,1,0) with !important for background
 * to override browser defaults
 */

.form-input,
#organization-info-modal input,
#organization-info-modal select,
#organization-info-modal textarea {
    width: 100%;
    padding: 0.75em 1em;
    background: var(--glass-secondary) !important;
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary) !important;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus,
#organization-info-modal input:focus,
#organization-info-modal select:focus,
#organization-info-modal textarea:focus {
    outline: none;
    border-color: #f97316;
    background: var(--glass-hover) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.form-input::placeholder,
#organization-info-modal input::placeholder,
#organization-info-modal textarea::placeholder {
    color: var(--text-tertiary);
}

/* Select dropdown arrow - theme aware */
#organization-info-modal select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--text-secondary) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1em center !important;
    background-size: 12px 12px !important;
    padding-right: 2.5em;
    color: rgba(30, 30, 35, 0.95) !important;
}

/* Select option styling for better readability */
#organization-info-modal select option {
    background: white;
    color: rgba(30, 30, 35, 0.95);
    padding: 0.5em;
}

/* Signature canvas background - theme aware */
.signature-canvas-container {
    background: var(--glass-secondary);
}

/* Light themes - white canvas for better signature visibility */
body[data-theme="light"] .signature-canvas-container,
body[data-theme="lightmodern"] .signature-canvas-container {
    background: rgba(255, 255, 255, 0.9);
}

/* Dark themes - lighter canvas for signature visibility */
body[data-theme="dark"] .signature-canvas-container,
body[data-theme="darkart"] .signature-canvas-container,
body[data-theme="darkmodern"] .signature-canvas-container {
    background: rgba(255, 255, 255, 0.85);
}

/* =============================================================================
   ORGANIZATION MODAL - TEXT READABILITY ON DARK GLASS BACKGROUND
   ============================================================================= */

/**
 * The organization modal uses a dark glass-card background.
 * Text must always be light/white for readability regardless of page theme.
 * This overrides theme-based text colors inside the modal.
 */

/* Modal title and subtitle */
#organization-info-modal .heading-2,
#organization-info-modal h2 {
    color: var(--text-primary) !important;
}

#organization-info-modal .caption.text-secondary,
#organization-info-modal p.caption {
    color: var(--text-secondary) !important;
}

/* Section headers (Kontaktperson, Adresse, etc.) */
#organization-info-modal h3,
#organization-info-modal .form-label {
    color: var(--text-primary) !important;
}

/* Form labels */
#organization-info-modal label {
    color: var(--text-secondary) !important;
}

/* Helper text under inputs */
#organization-info-modal .helper-text {
    color: var(--text-tertiary) !important;
}

/* Close button */
#organization-info-modal button[onclick*="closeOrganizationInfoModal"] {
    color: var(--text-secondary);
}

#organization-info-modal button[onclick*="closeOrganizationInfoModal"]:hover {
    color: var(--text-primary);
}

/* Radix icons in section headers */
#organization-info-modal .radix-icon {
    color: var(--text-secondary);
}

/* Input text should be dark on light input backgrounds */
#organization-info-modal input,
#organization-info-modal select,
#organization-info-modal textarea {
    color: rgba(30, 30, 35, 0.95) !important;
}

#organization-info-modal input::placeholder,
#organization-info-modal textarea::placeholder {
    color: rgba(100, 100, 110, 0.7) !important;
}

/* Signature section text */
#organization-info-modal .signature-tab-content .helper-text,
#organization-info-modal #signature-upload-instruction,
#organization-info-modal #signature-upload-format,
#organization-info-modal #signature-draw-instruction {
    color: var(--text-secondary) !important;
}

/* Button text in signature tabs */
#organization-info-modal .glass-button {
    color: var(--text-primary);
}

/* Theme-specific overrides for better contrast */

/* Light themes - slightly darker input backgrounds */
body[data-theme="light"] .form-input,
body[data-theme="light"] #organization-info-modal input,
body[data-theme="light"] #organization-info-modal select,
body[data-theme="lightmodern"] .form-input,
body[data-theme="lightmodern"] #organization-info-modal input,
body[data-theme="lightmodern"] #organization-info-modal select {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(0, 0, 0, 0.15);
}

body[data-theme="light"] .form-input:focus,
body[data-theme="light"] #organization-info-modal input:focus,
body[data-theme="light"] #organization-info-modal select:focus,
body[data-theme="lightmodern"] .form-input:focus,
body[data-theme="lightmodern"] #organization-info-modal input:focus,
body[data-theme="lightmodern"] #organization-info-modal select:focus {
    background: rgba(255, 255, 255, 0.9) !important;
}

/* Dark themes - solid light input backgrounds for modal readability */
body[data-theme="dark"] .form-input,
body[data-theme="dark"] #organization-info-modal input,
body[data-theme="darkart"] .form-input,
body[data-theme="darkart"] #organization-info-modal input,
body[data-theme="darkmodern"] .form-input,
body[data-theme="darkmodern"] #organization-info-modal input {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: rgba(30, 30, 35, 0.95) !important;
}

body[data-theme="dark"] .form-input:focus,
body[data-theme="dark"] #organization-info-modal input:focus,
body[data-theme="darkart"] .form-input:focus,
body[data-theme="darkart"] #organization-info-modal input:focus,
body[data-theme="darkmodern"] .form-input:focus,
body[data-theme="darkmodern"] #organization-info-modal input:focus {
    background: rgba(255, 255, 255, 0.95) !important;
}

/* Dark theme select focus - maintain solid background */
body[data-theme="dark"] #organization-info-modal select:focus,
body[data-theme="darkart"] #organization-info-modal select:focus,
body[data-theme="darkmodern"] #organization-info-modal select:focus {
    background-color: var(--text-primary) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1em center !important;
    background-size: 12px 12px !important;
}

/* Dark theme select - solid light background for readability */
body[data-theme="dark"] #organization-info-modal select,
body[data-theme="darkart"] #organization-info-modal select,
body[data-theme="darkmodern"] #organization-info-modal select {
    background-color: var(--text-primary) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1em center !important;
    background-size: 12px 12px !important;
    color: rgba(30, 30, 35, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* =============================================================================
   ADDITIONAL PAGE-SPECIFIC STYLES (Inline Style Extraction)
   ============================================================================= */

/**
 * These classes replace inline styles found throughout user-profile.html
 * They follow the COEUS design system conventions and are theme-aware
 */

/* --- Layout Patterns --- */

.profile-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5em;
}

.profile-logo-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5em;
}

.profile-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 48em) {
    .profile-two-column {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.profile-three-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25em;
}

@media (max-width: 64em) {
    .profile-three-column {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 48em) {
    .profile-three-column {
        grid-template-columns: 1fr;
    }
}

.profile-info-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Logo Preview Container --- */

.logo-preview-container {
    width: 9.375em;  /* 150px */
    height: 4.6875em;  /* 75px */
    border-radius: 0.5em;
    background: var(--glass-primary);
    border: 2px dashed var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.logo-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    text-align: center;
    color: var(--text-tertiary);
}

.logo-placeholder-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25em;
    display: block;
}

.logo-placeholder-text {
    font-size: 0.6875em;  /* 11px */
}

/* --- Edit Button (Transparent) --- */

.edit-btn {
    background: transparent;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.edit-btn:hover {
    color: var(--text-primary);
}

/* --- Letterhead Preview --- */

.letterhead-preview {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 1.5rem;
    min-height: 18.75em;  /* 300px */
}

.letterhead-logo-section {
    text-align: center;
    margin-bottom: 1rem;
}

.letterhead-logo-img {
    max-height: 5em;  /* 80px */
    max-width: 12.5em;  /* 200px */
    object-fit: contain;
    margin: 0 auto;
}

.letterhead-logo-placeholder {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.letterhead-logo-placeholder-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.letterhead-content {
    text-align: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.letterhead-company-name {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.letterhead-contact-person {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.letterhead-address {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.letterhead-contact-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.letterhead-contact-icon {
    width: 1rem;
    text-align: center;
    margin-right: 0.5rem;
}

.letterhead-signature-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.letterhead-signature-label {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.letterhead-signature-img {
    height: 3.75em;  /* 60px */
    max-width: 11.25em;  /* 180px */
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* --- Section Dividers --- */

.section-divider {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 1.5em;
    padding-top: 1.5em;
}

[data-theme="dark"] .section-divider,
[data-theme="darkart"] .section-divider,
[data-theme="darkmodern"] .section-divider {
    border-top-color: rgba(255, 255, 255, 0.15);
}

.section-header {
    color: var(--text-primary);
    margin-bottom: 1em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

/* --- Token Usage Cards (Progress Bars) --- */

.usage-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18.75em, 1fr));
    gap: 1.25em;
    margin-bottom: 1.5em;
}

.progress-container {
    margin: 0.75em 0;
}

.progress-track {
    width: 100%;
    height: 0.5em;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 100vmax;
    overflow: hidden;
}

[data-theme="dark"] .progress-track,
[data-theme="darkart"] .progress-track,
[data-theme="darkmodern"] .progress-track {
    background: rgba(255, 255, 255, 0.15);
}

.progress-fill {
    height: 100%;
    border-radius: 100vmax;
    transition: width 0.3s ease;
}

.progress-fill-purple {
    background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%);
}

.progress-fill-emerald {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.progress-fill-amber {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.progress-fill-blue {
    background: linear-gradient(90deg, #FF9500 0%, #E8870A 100%);
}

/* --- Info Box (Tips/Hints) --- */

.info-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0.75em;
    padding: 1em;
}

.info-box-content {
    display: flex;
    align-items: start;
    gap: 0.75em;
}

.info-box-icon {
    color: #10b981;
    font-size: 1.25em;
    margin-top: 0.125em;
    flex-shrink: 0;
}

.info-box-text {
    flex: 1;
}

.info-box-title {
    color: var(--text-primary);
    margin: 0 0 0.5em 0;
}

.info-box-description {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Dark theme info box */
[data-theme="dark"] .info-box,
[data-theme="darkart"] .info-box,
[data-theme="darkmodern"] .info-box {
    background: rgba(48, 209, 88, 0.15);
    border-color: rgba(48, 209, 88, 0.25);
}

/* --- Admin Panel Styles --- */

.admin-panel {
    margin-top: 1.5em;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
}

.admin-title-group h4 {
    color: var(--text-primary);
    margin-bottom: 0.25em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.admin-title-icon {
    color: #f59e0b;
}

.admin-description {
    color: var(--text-secondary);
    margin: 0;
}

.test-email-section {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 0.75em;
    padding: 1.25em;
}

[data-theme="dark"] .test-email-section,
[data-theme="darkart"] .test-email-section,
[data-theme="darkmodern"] .test-email-section {
    background: rgba(255, 159, 10, 0.15);
    border-color: rgba(255, 159, 10, 0.25);
}

.test-email-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1em;
}

.test-email-title-group h4 {
    color: var(--text-primary);
    margin-bottom: 0.25em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.test-email-title-icon {
    color: #f59e0b;
}

.test-email-description {
    color: var(--text-secondary);
    margin: 0;
}

.test-email-input-group {
    margin-bottom: 0.75em;
}

.test-email-input-label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

.test-email-input {
    width: 100%;
    padding: 0.625em 1em;
    border: 1px solid #d1d5db;
    border-radius: 0.5em;
    color: var(--text-primary);
    background: var(--glass-primary);
}

[data-theme="dark"] .test-email-input,
[data-theme="darkart"] .test-email-input,
[data-theme="darkmodern"] .test-email-input {
    border-color: var(--text-quaternary);
    background: rgba(255, 255, 255, 0.1);
}

.test-email-hint {
    color: var(--text-secondary);
    margin-top: 0.25em;
}

/* --- Modal Styles --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 43.75em;  /* 700px */
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2em;
    position: relative;
    margin: 1.25em;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5em;
}

.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
    padding: 0.25em;
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

/* --- Form Grid Layouts --- */

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75em;
}

.form-grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75em;
}

.form-grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.75em;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75em;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

@media (max-width: 48em) {
    .form-grid-3,
    .form-grid-2-1,
    .form-grid-1-2,
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field-label {
    display: block;
    margin-bottom: 0.375em;
}

.form-field-hint {
    margin-top: 0.25em;
    font-size: 0.6875em;  /* 11px */
}

/* --- Phone Input with Country Code --- */

.phone-input-grid {
    display: grid;
    grid-template-columns: 7.5em 1fr;
    gap: 0.5em;
}

/* --- Signature Section --- */

.signature-tabs {
    display: flex;
    gap: 0.5em;
    margin-bottom: 0.75em;
}

.signature-tab-btn {
    flex: 1;
    font-size: 0.875em;
}

.signature-upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: 0.5em;
    padding: 1.5em;
    text-align: center;
    background: var(--glass-primary);
    cursor: pointer;
}

.signature-upload-icon {
    font-size: 2rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5em;
    display: block;
}

.signature-preview-container {
    margin-top: 0.75em;
}

.signature-preview-img {
    max-width: 100%;
    max-height: 9.375em;  /* 150px */
    border: 1px solid var(--glass-border);
    border-radius: 0.25em;
}

.signature-canvas-wrapper {
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    overflow: hidden;
}

.signature-canvas {
    width: 100%;
    height: 12.5em;  /* 200px */
    display: block;
    touch-action: none;
}

/* --- Modal Footer --- */

.modal-footer {
    display: flex;
    gap: 0.75em;
    justify-content: flex-end;
    padding-top: 0.75em;
    border-top: 1px solid var(--glass-border);
}

/* --- Fingerprint Modal --- */

.fingerprint-modal-content {
    max-width: 31.25em;  /* 500px */
    width: 100%;
    text-align: center;
}

.fingerprint-modal-title {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.fingerprint-modal-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.fingerprint-animation-container {
    width: 12.5em;  /* 200px */
    height: 12.5em;
    margin: 0 auto 2rem;
}

.scan-progress-section {
    margin-bottom: 2rem;
}

.scan-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.scan-progress-label {
    color: var(--text-secondary);
}

.scan-progress-percent {
    color: #6366f1;
}

.scan-progress-bar-container {
    height: 0.5em;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 100vmax;
    overflow: hidden;
}

[data-theme="dark"] .scan-progress-bar-container,
[data-theme="darkart"] .scan-progress-bar-container,
[data-theme="darkmodern"] .scan-progress-bar-container {
    background: rgba(255, 255, 255, 0.15);
}

.scan-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
}

.scan-status {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

/* --- Status Icons with Colors --- */

.status-icon-success {
    color: var(--ios-system-green);
}

.status-icon-warning {
    color: var(--ios-system-orange);
}

.status-icon-error {
    color: var(--ios-system-red);
}

.status-icon-info {
    color: var(--ios-system-orange);
}

/* --- Compact Button Styles --- */

.btn-compact {
    padding: 0.25em 0.75em;
    font-size: 0.75em;
    display: flex;
    align-items: center;
    gap: 0.375em;
}

.btn-full-width {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}

.btn-opacity-low {
    opacity: 0.7;
}

/* --- Empty State Icons --- */

.empty-state-icon {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.empty-state-icon-large {
    font-size: 6rem;
    color: #6366f1;
}

/* --- WebAuthn Status Icons (JS-Generated) --- */

.webauthn-status-supported {
    color: #10b981;
}

.webauthn-status-partial {
    color: #fbbf24;
}

.webauthn-status-unsupported {
    color: #ef4444;
}

/* ============================================
   ADMIN ACCOUNT TYPE SWITCHER
   ============================================ */

.admin-section-card {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 20px;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.admin-section-title {
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-section-subtitle {
    color: var(--text-secondary);
    margin: 0;
}

.account-type-info {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--glass-secondary);
    border-radius: 8px;
}

.account-type-info .helper-text {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text-secondary);
}

.account-type-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.account-type-option {
    display: block;
    cursor: pointer;
}

.account-type-option input[type="radio"] {
    display: none;
}

.account-type-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--glass-primary);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.account-type-label:hover {
    background: var(--glass-hover);
    border-color: rgba(139, 92, 246, 0.3);
}

.account-type-option input[type="radio"]:checked + .account-type-label {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.account-type-label .radix-icon {
    font-size: 1.5em;
    color: var(--text-secondary);
}

.account-type-option input[type="radio"]:checked + .account-type-label .radix-icon {
    color: #8b5cf6;
}

.account-type-label span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-type-label strong {
    color: var(--text-primary);
    font-weight: 600;
}

.account-type-label small {
    color: var(--text-secondary);
    font-size: 0.85em;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-notification .radix-icon {
    font-size: 1.2em;
}

.toast-success {
    background: rgba(16, 185, 129, 0.9);
    color: var(--text-primary);
}

.toast-error {
    background: rgba(239, 68, 68, 0.9);
    color: var(--text-primary);
}

.toast-info {
    background: rgba(59, 130, 246, 0.9);
    color: var(--text-primary);
}

/* ============================================
   ADMIN SECTION BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.75em 1.25em;
    border-radius: var(--radius-md, 8px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border-color: var(--ios-system-orange);
}

.btn-primary:hover {
    background: #e68600;
    border-color: #e68600;
}

.btn-primary .radix-icon {
    color: var(--button-text-on-color);
}

/* Admin section card */
.admin-section-card .btn-primary {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border-color: var(--ios-system-orange);
}

#test-email-section .btn-primary {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border-color: var(--ios-system-orange);
}

/* =====================================================
   CREDIT USAGE - TreeMap Display
   ===================================================== */

/* Credit Header */
.credit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.credit-total {
    display: flex;
    flex-direction: column;
}

.credit-count {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    font-family: var(--font-sans);
}

.credit-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.credit-value {
    font-size: 18px;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Reset Date Display */
.credit-reset {
    text-align: right;
}

.reset-date {
    font-size: 14px;
    color: var(--text-secondary);
    display: block;
}

.reset-countdown {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-left: 4px;
}

.reset-countdown.countdown-warning {
    color: var(--ios-system-orange);
    font-weight: 500;
}

/* TreeMap Container */
.treemap-container {
    position: relative;
    background: var(--glass-primary);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

#credit-treemap {
    width: 100%;
    min-height: 300px;
    height: clamp(280px, 40vw, 400px);
}

/* TreeMap tooltip styling */
.treemap-tooltip {
    padding: 8px 12px;
    background: var(--glass-secondary);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-family: var(--font-sans);
}

.treemap-tooltip .tooltip-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.treemap-tooltip .tooltip-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

/* No usage message */
.treemap-no-usage {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-tertiary);
    font-size: 15px;
}

.treemap-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(59, 130, 246, 0.08), transparent 55%),
        radial-gradient(circle at 82% 5%, rgba(16, 185, 129, 0.12), transparent 50%),
        radial-gradient(circle at 78% 80%, rgba(124, 58, 237, 0.08), transparent 45%);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

/* Credit Costs Grid */
.credit-costs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.credit-cost-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--glass-primary);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
}

.credit-cost-item:hover {
    background: var(--glass-hover);
    transform: translateY(-1px);
}

.cost-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cost-color.large-new { background: #7c3aed; }
.cost-color.large-continue { background: #a855f7; }
.cost-color.medium-new { background: #10b981; }
.cost-color.medium-continue { background: #22c55e; }
.cost-color.ocr { background: #FF9500; }
.cost-color.beleg { background: #f59e0b; }

/* Beleg cost breakdown */
.credit-cost-item.beleg-group .cost-breakdown {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.cost-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cost-action-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.cost-credit-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Reset Info */
.credit-reset-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.credit-reset-info .radix-icon {
    color: #10b981;
    font-size: 18px;
}

.credit-reset-info strong {
    color: var(--text-primary);
}

/* Dark theme adjustments */
[data-theme="dark"] .treemap-container {
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .treemap-container::before {
    opacity: 0.4;
}

[data-theme="dark"] .credit-reset-info {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .credit-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .credit-reset {
        text-align: left;
    }

    .credit-count {
        font-size: 36px;
    }

    #credit-treemap {
        min-height: 250px;
        height: 280px;
    }

    .credit-costs-grid {
        grid-template-columns: 1fr;
    }
}

/**
 * @file passkey-enrollment.css
 * @filepath public/css/components/passkey-enrollment.css
 * @directory public/css/components
 * @access_level PUBLIC
 * @security_level LOW
 * @last_updated 2025-11-08
 *
 * <file_documentation>
 *   <metadata>
 *     <filename>passkey-enrollment.css</filename>
 *     <filepath>public/css/components/passkey-enrollment.css</filepath>
 *     <directory>public/css/components</directory>
 *     <access_level>PUBLIC</access_level>
 *     <security_level>LOW</security_level>
 *   </metadata>
 *
 *   <purpose>
 *     Theme-aware styles for the Passkey Enrollment Modal component.
 *     Uses COEUS design system variables for consistent theming across light/dark/colors modes.
 *     Follows glassmorphism design with proper accessibility and responsive behavior.
 *   </purpose>
 *
 *   <imports>
 *     Imported via: coeus-master.css
 *   </imports>
 *
 *   <dependencies>
 *     - coeus-master.css (theme variables)
 *     - global-theme-loader.js (theme switching)
 *   </dependencies>
 *
 *   <theme_variables>
 *     - --text-primary, --text-secondary, --text-tertiary
 *     - --glass-primary, --glass-secondary, --glass-hover, --glass-border
 *     - --ios-system-orange, --ios-system-green, --ios-system-red
 *     - --button-text-on-color (text color for colored button backgrounds)
 *   </theme_variables>
 *
 *   <classes>
 *     - .passkey-modal-backdrop - Full screen modal overlay
 *     - .passkey-icon-container - Circular icon background
 *     - .passkey-progress-track - Progress bar container
 *     - .passkey-progress-bar - Animated progress indicator
 *     - .glass-button-primary - Primary action button
 *     - .device-suggestion - Device name suggestion chips
 *     - .fingerprint-animation - Animated fingerprint icon
 *     - .position-indicator-* - Finger position guidance indicators
 *     - .quality-indicator-* - Quality status indicators
 *   </classes>
 *
 *   <usage>
 *     Used by: public/js/components/passkey-enrollment.js
 *     Rendered in: user-profile.html (passkey enrollment modal)
 *   </usage>
 *
 *   <recent_changes>
 *     - Created comprehensive theme-aware styles
 *     - Replaced all inline styles with CSS classes
 *     - Added proper z-index layering for modal
 *     - Implemented smooth animations and transitions
 *     - 2025-12-29: Added light theme overrides for proper text contrast
 *       - passkey-section-card: white background with charcoal blue text
 *       - passkey modal: light glass card with dark text colors
 *       - input fields, buttons, device suggestions styled for light mode
 *     - 2025-12-29: Added comprehensive modal spacing & layout
 *       - Modal card padding increased (2rem 2.5rem)
 *       - Step content spacing for all 3 steps
 *       - Info box margins and padding
 *       - Footer button container with border separator
 *       - Status message spacing for error states
 *       - Responsive adjustments for mobile
 *   </recent_changes>
 * </file_documentation>
 */

/* =========================================
   PASSKEY SECTION CARD (User Profile)
   ========================================= */

.passkey-section-card {
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1.5rem !important;
}

.passkey-section-card .passkey-list {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.passkey-section-card .passkey-list:empty {
    display: none;
}

/* Empty state in passkey list */
.passkey-section-card .empty-state {
    padding: 1.25rem;
    text-align: center;
    background: var(--glass-primary);
    border-radius: 0.75rem;
    border: 1px solid var(--glass-border);
}

.passkey-section-card .empty-state-icon {
    font-size: 2rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
    display: block;
}

.passkey-section-card .empty-state-text {
    color: var(--text-secondary);
    font-style: italic;
    margin: 0 0 0.25rem 0;
}

.passkey-section-card .empty-state-hint {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin: 0;
}

/* Passkey item cards */
.passkey-section-card .passkey-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--glass-primary);
    border-radius: 0.75rem;
    border: 1px solid var(--glass-border);
}

/* Primary button in passkey section - SUNSET ORANGE */
.passkey-section-card .glass-button-primary,
.passkey-section-card #add-passkey-btn {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%) !important;
    color: var(--button-text-on-color);
    border: none !important;
    padding: 0.875rem 1.5rem !important;
    margin-top: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.passkey-section-card .glass-button-primary:hover,
.passkey-section-card #add-passkey-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--ios-system-green);
    font-size: 0.75rem;
}

/* =========================================
   MODAL BACKDROP & CONTAINER
   ========================================= */

.passkey-modal-backdrop {
    background: rgba(0, 0, 0, var(--glass-opacity));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* =========================================
   ICON CONTAINER - HIDDEN
   ========================================= */

.passkey-icon-container {
    display: none !important;
}

/* =========================================
   PROGRESS BAR
   ========================================= */

.passkey-progress-track {
    width: 100%;
    background: var(--glass-secondary);
    border-radius: 9999px;
    height: 0.5rem;
    overflow: hidden;
}

.passkey-progress-bar {
    background: linear-gradient(90deg, #f97316, #fb923c);
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
    width: 0%;
}

/* =========================================
   BUTTONS
   ========================================= */

/* Primary action button (sunset orange gradient) */
.glass-button-primary {
    background: linear-gradient(135deg, #f97316, #fb923c) !important;
    color: var(--button-text-on-color);
    border: none !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.glass-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

/* Secondary/cancel button - transparent with border */
.glass-button-secondary,
.glass-button:not(.glass-button-primary):not(.glass-button-success):not(.glass-button-danger) {
    background: var(--glass-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--glass-border) !important;
}

.glass-button-secondary:hover,
.glass-button:not(.glass-button-primary):not(.glass-button-success):not(.glass-button-danger):hover {
    background: var(--glass-hover) !important;
    border-color: var(--glass-border-hover) !important;
}

/* Success button (green gradient) */
.glass-button-success {
    background: linear-gradient(135deg, var(--ios-system-green), #2dd4bf) !important;
    color: var(--button-text-on-color);
    border: none !important;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

.glass-button-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(52, 199, 89, 0.4);
}

/* Danger button (red) */
.glass-button-danger {
    background: linear-gradient(135deg, var(--ios-system-red), #ef4444) !important;
    color: var(--button-text-on-color);
    border: none !important;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.glass-button-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 59, 48, 0.4);
}

/* =========================================
   PASSKEY MODAL SPECIFIC BUTTON OVERRIDES
   ========================================= */

/* Button container - ensure proper spacing */
.passkey-modal-backdrop .flex.gap-md.mt-lg,
.passkey-modal-backdrop .flex.gap-md {
    margin-top: 1.5rem !important;
    gap: 1rem !important;
    padding-top: 0.5rem;
}

/* All buttons in passkey modal - COMPREHENSIVE padding fix */
.passkey-modal-backdrop .glass-button,
.passkey-modal-backdrop button.glass-button,
.passkey-modal-backdrop #cancel-btn,
.passkey-modal-backdrop #next-btn {
    background: var(--glass-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* CRITICAL: Override all padding - px-lg py-sm classes conflict */
    padding: 0.875rem 1.5rem !important;
    min-height: 3rem !important;
    border-radius: 0.75rem;
    font-weight: 500;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    transition: all 0.2s ease;
}

.passkey-modal-backdrop .glass-button:hover,
.passkey-modal-backdrop button.glass-button:hover {
    background: var(--glass-hover) !important;
    border-color: var(--glass-border-hover) !important;
}

/* Primary button in passkey modal (Next/Continue) - SUNSET ORANGE */
.passkey-modal-backdrop .glass-button.glass-button-primary,
.passkey-modal-backdrop .glass-button-primary,
.passkey-modal-backdrop #next-btn.glass-button-primary {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%) !important;
    color: var(--button-text-on-color);
    border: none !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    padding: 0.875rem 1.5rem !important;
    min-height: 3rem !important;
}

.passkey-modal-backdrop .glass-button.glass-button-primary:hover,
.passkey-modal-backdrop .glass-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

/* Success button in passkey modal (Fertig in Step 3) - GREEN */
.passkey-modal-backdrop .glass-button.glass-button-success,
.passkey-modal-backdrop .glass-button-success,
.passkey-modal-backdrop #next-btn.glass-button-success {
    background: linear-gradient(135deg, var(--ios-system-green), #22c55e) !important;
    color: var(--button-text-on-color);
    border: none !important;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
    padding: 0.875rem 1.5rem !important;
    min-height: 3rem !important;
}

.passkey-modal-backdrop .glass-button.glass-button-success:hover,
.passkey-modal-backdrop .glass-button-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(52, 199, 89, 0.4);
}

/* =========================================
   DEVICE SUGGESTION CHIPS
   ========================================= */

.device-suggestion,
.passkey-modal-backdrop .device-suggestion {
    font-size: 0.75rem;
    background: var(--glass-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--glass-border) !important;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    transition: all 0.2s;
    cursor: pointer;
}

.device-suggestion:hover,
.passkey-modal-backdrop .device-suggestion:hover {
    background: var(--glass-hover) !important;
    border-color: #f97316 !important;
    color: #f97316 !important;
    transform: translateY(-1px);
}

.device-suggestion:active {
    transform: translateY(0);
}

/* =========================================
   FINGERPRINT ANIMATION
   ========================================= */

.fingerprint-animation {
    position: relative;
    display: inline-block;
}

.fingerprint-animation i {
    font-size: 4rem;
    color: #f97316;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
}
    50% {
        opacity: 0.5;
        transform: scale(1.05);
}
}

/* =========================================
   POSITION INDICATORS
   ========================================= */

.position-indicator {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.position-indicator i {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.position-indicator-active {
    background: rgba(249, 115, 22, 0.2);
    border-color: #f97316;
}

.position-indicator-active i {
    color: #f97316;
}

.position-indicator-completed {
    background: rgba(52, 199, 89, 0.2);
    border-color: var(--ios-system-green);
}

.position-indicator-completed i {
    color: var(--ios-system-green);
}

/* =========================================
   QUALITY INDICATORS
   ========================================= */

.quality-bar-container {
    width: 100%;
    background: var(--glass-secondary);
    border-radius: 9999px;
    height: 1rem;
    overflow: hidden;
}

.quality-bar {
    background: linear-gradient(90deg, var(--ios-system-red), #f59e0b, var(--ios-system-green));
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
    width: 0%;
}

.quality-indicator {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.quality-indicator-low {
    background: var(--ios-system-red);
}

.quality-indicator-medium {
    background: #f59e0b;
}

.quality-indicator-good {
    background: #f97316;
}

.quality-indicator-excellent {
    background: var(--ios-system-green);
}

/* =========================================
   INFO BOXES
   ========================================= */

.info-box {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1rem;
}

.info-box-blue {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
}

.info-box-green {
    background: rgba(52, 199, 89, 0.1);
    border-color: rgba(52, 199, 89, 0.3);
}

.info-box-gradient {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(251, 146, 60, 0.1));
    border-color: rgba(249, 115, 22, 0.3);
}

/* =========================================
   STATUS MESSAGES
   ========================================= */

.status-message {
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.status-message-loading {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.status-message-success {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.status-message-error {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.status-message i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.status-message-loading i {
    color: #f97316;
}

.status-message-success i {
    color: var(--ios-system-green);
}

.status-message-error i {
    color: var(--ios-system-red);
}

/* =========================================
   INPUT FIELDS
   ========================================= */

.passkey-input,
.passkey-modal-backdrop input,
.passkey-modal-backdrop input[type="text"] {
    width: 100%;
    background: var(--glass-primary) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary) !important;
    font-size: 1rem;
    transition: all 0.2s;
}

.passkey-input::placeholder,
.passkey-modal-backdrop input::placeholder {
    color: var(--text-tertiary) !important;
}

.passkey-input:focus,
.passkey-modal-backdrop input:focus {
    outline: none;
    border-color: #f97316 !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

/* =========================================
   CHECKBOX STYLING
   ========================================= */

.passkey-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #f97316;
    cursor: pointer;
}

/* =========================================
   TIP LIST
   ========================================= */

.tip-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.tip-item i {
    color: var(--ios-system-green);
    margin-right: 0.5rem;
    margin-top: 0.125rem;
    font-size: 0.75rem;
}

.tip-item strong {
    color: var(--text-primary);
}

.tip-item span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* =========================================
   MODAL SPACING & LAYOUT
   ========================================= */

/* Modal card padding */
.passkey-modal-backdrop .glass-card,
#passkey-modal .glass-card,
#passkey-modal-content .glass-card {
    padding: 2rem 2.5rem !important;
}

/* Header spacing */
.passkey-modal-backdrop .text-center.mb-lg,
#passkey-modal .text-center.mb-lg {
    margin-bottom: 1.5rem !important;
}

/* Progress bar section */
.passkey-modal-backdrop .mb-lg:has(.passkey-progress-track),
#passkey-modal .mb-lg:has(.passkey-progress-track) {
    margin-bottom: 2rem !important;
}

/* Step content container */
#step-content {
    margin-bottom: 1.5rem;
}

/* Step titles - more breathing room */
#step-content h3 {
    margin-bottom: 0.75rem !important;
}

#step-content h3 + p {
    margin-bottom: 1.5rem !important;
}

/* Step 2 specific spacing */
.step-2 .text-center.mb-xl {
    margin-bottom: 2rem !important;
}

.step-2 .info-box {
    margin-bottom: 1.5rem !important;
    padding: 1.25rem !important;
}

.step-2 .info-box .flex.gap-sm {
    margin-bottom: 1rem !important;
}

.step-2 .info-box .flex.gap-sm:last-child {
    margin-bottom: 0 !important;
}

/* Status message spacing */
.step-2 .status-message,
#enrollment-status {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    padding: 1.25rem !important;
}

/* Error message with retry button */
.step-2 .status-message-error,
#enrollment-status.status-message-error {
    margin-top: 2rem !important;
}

/* Retry button inside status */
.status-message .glass-button,
#enrollment-status .glass-button {
    margin-top: 1rem !important;
}

/* Step 3 specific spacing */
.step-3 .text-center {
    margin-bottom: 2rem !important;
}

.step-3 .text-center h3 {
    margin-top: 0.75rem !important;
    margin-bottom: 0.5rem !important;
}

/* Step 3 info boxes - proper gaps */
.step-3 .info-box,
.step-3 .info-box-green,
.step-3 .info-box-blue,
.step-3 .info-box-gradient {
    margin-bottom: 1rem !important;
    padding: 1.25rem !important;
}

.step-3 .info-box:last-of-type {
    margin-bottom: 0 !important;
}

/* Summary box (green) */
.step-3 .info-box-green {
    padding: 1.5rem !important;
}

.step-3 .info-box-green h4 {
    margin-bottom: 1rem !important;
}

/* Primary passkey toggle section */
.step-3 .flex.items-center.gap-md {
    padding: 1rem 0 !important;
}

/* Next steps box */
.step-3 .info-box-gradient {
    padding: 1.25rem !important;
}

.step-3 .info-box-gradient h4 {
    margin-bottom: 0.75rem !important;
}

.step-3 .info-box-gradient ul,
.step-3 .info-box-gradient .tip-list {
    margin: 0 !important;
    padding-left: 0.5rem !important;
}

.step-3 .info-box-gradient li {
    margin-bottom: 0.5rem !important;
}

.step-3 .info-box-gradient li:last-child {
    margin-bottom: 0 !important;
}

/* Footer button container - more separation */
.passkey-modal-backdrop .flex.gap-md.mt-lg,
#passkey-modal .flex.gap-md.mt-lg,
.passkey-modal-backdrop > .glass-card > .flex.gap-md:last-child,
#passkey-modal-content > .glass-card > .flex.gap-md:last-child {
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid var(--glass-border);
}

/* Button gap */
.passkey-modal-backdrop .flex.gap-md,
#passkey-modal .flex.gap-md {
    gap: 1rem !important;
}

/* Step 1 spacing */
.step-1 .text-center.mb-lg {
    margin-bottom: 1.5rem !important;
}

.step-1 .flex.flex-col.gap-md {
    gap: 1.25rem !important;
}

.step-1 .info-box {
    padding: 1.25rem !important;
}

/* Input field spacing */
.step-1 .flex.flex-col.gap-xs {
    gap: 0.5rem !important;
}

/* =========================================
   RESPONSIVE ADJUSTMENTS
   ========================================= */

@media (max-width: 48em) {
    /* Reduce modal padding on mobile */
    .passkey-modal-backdrop .glass-card,
    #passkey-modal .glass-card,
    #passkey-modal-content .glass-card {
        padding: 1.5rem 1.25rem !important;
    }

    /* Reduce spacing on mobile */
    .step-2 .info-box,
    .step-3 .info-box,
    .step-3 .info-box-green,
    .step-3 .info-box-gradient {
        padding: 1rem !important;
        margin-bottom: 0.875rem !important;
    }

    /* Footer buttons on mobile */
    .passkey-modal-backdrop .flex.gap-md.mt-lg,
    #passkey-modal .flex.gap-md.mt-lg {
        margin-top: 1.5rem !important;
        padding-top: 1rem !important;
    }

    .passkey-icon-container {
        width: 3rem;
        height: 3rem;
    }

    .passkey-icon-container i {
        font-size: 1.25rem;
    }

    .fingerprint-animation i {
        font-size: 3rem;
    }

    .position-indicator {
        padding: 0.375rem;
    }

    .position-indicator i {
        font-size: 1rem;
    }
}

/* =========================================
   LIGHT MODE ENHANCEMENTS
   ========================================= */

/* Light theme passkey section card - ensure high contrast */
[data-theme="light"] .passkey-section-card,
[data-theme="lightmodern"] .passkey-section-card {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(16, 185, 129, 0.25);
}

[data-theme="light"] .passkey-section-card .text-primary,
[data-theme="light"] .passkey-section-card h4,
[data-theme="light"] .passkey-section-card .form-label,
[data-theme="lightmodern"] .passkey-section-card .text-primary,
[data-theme="lightmodern"] .passkey-section-card h4,
[data-theme="lightmodern"] .passkey-section-card .form-label {
    color: rgba(44, 62, 80, 0.95) !important;
}

[data-theme="light"] .passkey-section-card .text-secondary,
[data-theme="light"] .passkey-section-card p,
[data-theme="lightmodern"] .passkey-section-card .text-secondary,
[data-theme="lightmodern"] .passkey-section-card p {
    color: rgba(44, 62, 80, 0.75) !important;
}

[data-theme="light"] .passkey-section-card .text-tertiary,
[data-theme="lightmodern"] .passkey-section-card .text-tertiary {
    color: rgba(44, 62, 80, 0.55) !important;
}

/* Light theme passkey item cards */
[data-theme="light"] .passkey-section-card .passkey-item,
[data-theme="lightmodern"] .passkey-section-card .passkey-item {
    background: rgba(255, 255, 255, 0.90) !important;
    border-color: rgba(44, 62, 80, 0.15) !important;
}

/* Light theme empty state */
[data-theme="light"] .passkey-section-card .empty-state,
[data-theme="lightmodern"] .passkey-section-card .empty-state {
    background: rgba(255, 255, 255, 0.80) !important;
    border-color: rgba(44, 62, 80, 0.12) !important;
}

/* Light theme passkey modal */
[data-theme="light"] .passkey-modal-backdrop,
[data-theme="lightmodern"] .passkey-modal-backdrop,
[data-theme="light"] #passkey-modal,
[data-theme="lightmodern"] #passkey-modal {
    background: rgba(0, 0, 0, 0.4) !important;
}

[data-theme="light"] .passkey-modal-backdrop .glass-card,
[data-theme="light"] #passkey-modal .glass-card,
[data-theme="light"] #passkey-modal-content .glass-card,
[data-theme="lightmodern"] .passkey-modal-backdrop .glass-card,
[data-theme="lightmodern"] #passkey-modal .glass-card,
[data-theme="lightmodern"] #passkey-modal-content .glass-card {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(44, 62, 80, 0.15) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Light theme modal text colors */
[data-theme="light"] .passkey-modal-backdrop h2,
[data-theme="light"] .passkey-modal-backdrop h3,
[data-theme="light"] .passkey-modal-backdrop h4,
[data-theme="light"] .passkey-modal-backdrop .text-primary,
[data-theme="light"] #passkey-modal h2,
[data-theme="light"] #passkey-modal h3,
[data-theme="light"] #passkey-modal h4,
[data-theme="light"] #passkey-modal .text-primary,
[data-theme="lightmodern"] .passkey-modal-backdrop h2,
[data-theme="lightmodern"] .passkey-modal-backdrop h3,
[data-theme="lightmodern"] .passkey-modal-backdrop h4,
[data-theme="lightmodern"] .passkey-modal-backdrop .text-primary,
[data-theme="lightmodern"] #passkey-modal h2,
[data-theme="lightmodern"] #passkey-modal h3,
[data-theme="lightmodern"] #passkey-modal h4,
[data-theme="lightmodern"] #passkey-modal .text-primary {
    color: rgba(44, 62, 80, 0.95) !important;
}

[data-theme="light"] .passkey-modal-backdrop p,
[data-theme="light"] .passkey-modal-backdrop .text-secondary,
[data-theme="light"] .passkey-modal-backdrop label,
[data-theme="light"] #passkey-modal p,
[data-theme="light"] #passkey-modal .text-secondary,
[data-theme="light"] #passkey-modal label,
[data-theme="lightmodern"] .passkey-modal-backdrop p,
[data-theme="lightmodern"] .passkey-modal-backdrop .text-secondary,
[data-theme="lightmodern"] .passkey-modal-backdrop label,
[data-theme="lightmodern"] #passkey-modal p,
[data-theme="lightmodern"] #passkey-modal .text-secondary,
[data-theme="lightmodern"] #passkey-modal label {
    color: rgba(44, 62, 80, 0.75) !important;
}

/* Light theme modal input fields */
[data-theme="light"] .passkey-modal-backdrop input,
[data-theme="light"] #passkey-modal input,
[data-theme="lightmodern"] .passkey-modal-backdrop input,
[data-theme="lightmodern"] #passkey-modal input {
    background: rgba(255, 255, 255, 0.90) !important;
    border-color: rgba(44, 62, 80, 0.20) !important;
    color: rgba(44, 62, 80, 0.95) !important;
}

[data-theme="light"] .passkey-modal-backdrop input::placeholder,
[data-theme="light"] #passkey-modal input::placeholder,
[data-theme="lightmodern"] .passkey-modal-backdrop input::placeholder,
[data-theme="lightmodern"] #passkey-modal input::placeholder {
    color: rgba(44, 62, 80, 0.45) !important;
}

/* Light theme device suggestions */
[data-theme="light"] .passkey-modal-backdrop .device-suggestion,
[data-theme="light"] #passkey-modal .device-suggestion,
[data-theme="lightmodern"] .passkey-modal-backdrop .device-suggestion,
[data-theme="lightmodern"] #passkey-modal .device-suggestion {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(44, 62, 80, 0.15) !important;
    color: rgba(44, 62, 80, 0.85) !important;
}

[data-theme="light"] .passkey-modal-backdrop .device-suggestion:hover,
[data-theme="light"] #passkey-modal .device-suggestion:hover,
[data-theme="lightmodern"] .passkey-modal-backdrop .device-suggestion:hover,
[data-theme="lightmodern"] #passkey-modal .device-suggestion:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #f97316 !important;
    color: #f97316 !important;
}

/* Light theme modal buttons */
[data-theme="light"] .passkey-modal-backdrop .glass-button,
[data-theme="light"] #passkey-modal .glass-button,
[data-theme="lightmodern"] .passkey-modal-backdrop .glass-button,
[data-theme="lightmodern"] #passkey-modal .glass-button {
    background: rgba(255, 255, 255, 0.90) !important;
    border: 1px solid rgba(44, 62, 80, 0.18) !important;
    color: rgba(44, 62, 80, 0.90) !important;
}

[data-theme="light"] .passkey-modal-backdrop .glass-button:hover,
[data-theme="light"] #passkey-modal .glass-button:hover,
[data-theme="lightmodern"] .passkey-modal-backdrop .glass-button:hover,
[data-theme="lightmodern"] #passkey-modal .glass-button:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: rgba(44, 62, 80, 0.25) !important;
}

/* Primary button keeps sunset orange in light mode */
[data-theme="light"] .passkey-modal-backdrop .glass-button-primary,
[data-theme="light"] #passkey-modal .glass-button-primary,
[data-theme="lightmodern"] .passkey-modal-backdrop .glass-button-primary,
[data-theme="lightmodern"] #passkey-modal .glass-button-primary {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* =========================================
   DARK MODE ENHANCEMENTS
   ========================================= */

[data-theme="dark"] .passkey-modal-backdrop,
[data-theme="darkart"] .passkey-modal-backdrop,
[data-theme="darkmodern"] .passkey-modal-backdrop {
    background: rgba(0, 0, 0, 0.8);
}

/* Icon container hidden - no dark mode styles needed */

/* Ensure modal card is properly styled for dark themes */
[data-theme="dark"] .passkey-modal-backdrop .glass-card,
[data-theme="darkart"] .passkey-modal-backdrop .glass-card,
[data-theme="darkmodern"] .passkey-modal-backdrop .glass-card {
    background: rgba(20, 25, 35, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Input fields in dark mode */
[data-theme="dark"] .passkey-modal-backdrop input,
[data-theme="darkart"] .passkey-modal-backdrop input,
[data-theme="darkmodern"] .passkey-modal-backdrop input {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .passkey-modal-backdrop input::placeholder,
[data-theme="darkart"] .passkey-modal-backdrop input::placeholder,
[data-theme="darkmodern"] .passkey-modal-backdrop input::placeholder {
    color: var(--text-quaternary) !important;
}

/* Device suggestions in dark mode */
[data-theme="dark"] .passkey-modal-backdrop .device-suggestion,
[data-theme="darkart"] .passkey-modal-backdrop .device-suggestion,
[data-theme="darkmodern"] .passkey-modal-backdrop .device-suggestion {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .passkey-modal-backdrop .device-suggestion:hover,
[data-theme="darkart"] .passkey-modal-backdrop .device-suggestion:hover,
[data-theme="darkmodern"] .passkey-modal-backdrop .device-suggestion:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: #f97316 !important;
}

/* Buttons in dark mode */
[data-theme="dark"] .passkey-modal-backdrop .glass-button,
[data-theme="darkart"] .passkey-modal-backdrop .glass-button,
[data-theme="darkmodern"] .passkey-modal-backdrop .glass-button {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .passkey-modal-backdrop .glass-button:hover,
[data-theme="darkart"] .passkey-modal-backdrop .glass-button:hover,
[data-theme="darkmodern"] .passkey-modal-backdrop .glass-button:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* Primary button keeps sunset orange in dark mode */
[data-theme="dark"] .passkey-modal-backdrop .glass-button-primary,
[data-theme="darkart"] .passkey-modal-backdrop .glass-button-primary,
[data-theme="darkmodern"] .passkey-modal-backdrop .glass-button-primary {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%) !important;
    border: none !important;
    color: var(--button-text-on-color);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Passkey section card styling for dark themes */
[data-theme="dark"] .passkey-section-card,
[data-theme="darkart"] .passkey-section-card,
[data-theme="darkmodern"] .passkey-section-card {
    border-color: rgba(16, 185, 129, 0.25);
} 

/* =========================================
   ACCESSIBILITY
   ========================================= */

.passkey-input:focus-visible,
.glass-button-primary:focus-visible,
.device-suggestion:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .passkey-progress-bar,
    .quality-bar,
    .device-suggestion,
    .position-indicator {
        transition: none;
}

    .fingerprint-animation i {
        animation: none;
}
}

/**
 * COEUS DESIGN SYSTEM - LOADING COMPONENT
 *
 * PURPOSE:
 * Loading spinner and overlay component with glassmorphism effect.
 * Used for page transitions and async operations.
 *
 * FEATURES:
 * - Full-screen overlay with glass effect
 * - Animated spinning indicator
 * - Centered layout with flexbox
 * - Theme-aware colors (Light, Dark, Colors)
 * - Smooth rotation animation
 * - Can be toggled with .hidden utility class
 *
 * DEPENDENCIES:
 * - core/variables.css (CSS variables)
 * - core/themes.css (theme switching)
 * - utilities/display.css (.hidden utility)
 *
 * USAGE:
 * <div id="loadingOverlay" class="loading-overlay hidden">
 *   <div class="glass-container-thin">
 *     <div class="loading-spinner"></div>
 *     <p class="text-callout font-medium text-secondary">Lade Inhalte...</p>
 *   </div>
 * </div>
 *
 * JavaScript:
 * loadingOverlay.classList.remove('hidden');
 * loadingOverlay.classList.add('hidden');
 *
 * CREATED: 2025-10-26
 * VERSION: 1.0.0
 */

/* ============================================ */
/*          LOADING OVERLAY                     */
/* ============================================ */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--glass-primary);
    backdrop-filter: var(--blur-regular);
    -webkit-backdrop-filter: var(--blur-regular);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

/* Hidden state - controlled by .hidden utility class */
.loading-overlay.hidden {
    display: none;
}

/* ============================================ */
/*          LOADING SPINNER                     */
/* ============================================ */

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--text-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Spin animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/**
 * END LOADING COMPONENT
 *
 * NOTES:
 * - Uses CSS variables for consistent theming
 * - Full-screen overlay prevents interaction
 * - Smooth spin animation for visual feedback
 * - Centered with flexbox for perfect alignment
 * - Works with .hidden utility for show/hide
 */

/**
 * COEUS DESIGN SYSTEM - UNSAVED CHANGES MODAL
 *
 * PURPOSE:
 * Warning modal shown when user attempts to navigate away with unsaved changes.
 * Provides options to cancel or confirm navigation.
 *
 * FEATURES:
 * - Full-screen overlay with blur backdrop
 * - Glassmorphism modal content
 * - Theme-aware colors (Light, Dark, Colors)
 * - Responsive sizing (mobile-friendly)
 * - Smooth hover effects on buttons
 * - Warning icon and clear messaging
 *
 * DEPENDENCIES:
 * - core/variables.css (CSS variables)
 * - core/themes.css (theme switching)
 * - core/typography.css (font system)
 *
 * USAGE:
 * <div id="unsavedChangesModal" class="unsaved-changes-modal-overlay" style="display: none;">
 *   <div class="unsaved-changes-modal-content">
 *     <div class="unsaved-changes-icon">⚠️</div>
 *     <h3 class="unsaved-changes-title">Title</h3>
 *     <p class="unsaved-changes-text">Message</p>
 *     <div class="unsaved-changes-actions">
 *       <button class="unsaved-changes-btn-secondary">Cancel</button>
 *       <button class="unsaved-changes-btn-danger">Confirm</button>
 *     </div>
 *   </div>
 * </div>
 *
 * CREATED: 2025-10-26
 * VERSION: 1.0.0
 */

/* ============================================ */
/*          MODAL OVERLAY                       */
/* ============================================ */

.unsaved-changes-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* ============================================ */
/*          MODAL CONTENT                       */
/* ============================================ */

.unsaved-changes-modal-content {
    background: var(--card-bg, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 20px;
    padding: 2rem;
    min-width: 320px;
    max-width: 90%;
    width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: 'Noto Sans', sans-serif;
}

/* ============================================ */
/*          MODAL ICON                          */
/* ============================================ */

.unsaved-changes-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* ============================================ */
/*          MODAL TITLE                         */
/* ============================================ */

.unsaved-changes-title {
    color: var(--text-primary, #1a202c);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    text-align: center;
    font-family: 'Noto Sans', sans-serif;
}

/* ============================================ */
/*          MODAL TEXT                          */
/* ============================================ */

.unsaved-changes-text {
    color: var(--text-secondary, #6b7280);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    text-align: center;
    font-family: 'Noto Sans', sans-serif;
}

/* ============================================ */
/*          MODAL ACTIONS                       */
/* ============================================ */

.unsaved-changes-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ============================================ */
/*          SECONDARY BUTTON                    */
/* ============================================ */

.unsaved-changes-btn-secondary {
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    background: var(--btn-secondary-bg, rgba(243, 244, 246, 0.95));
    color: var(--btn-secondary-text, #374151);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Noto Sans', sans-serif;
}

.unsaved-changes-btn-secondary:hover {
    background: rgba(229, 231, 235, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================ */
/*          DANGER BUTTON                       */
/* ============================================ */

.unsaved-changes-btn-danger {
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    background: #ef4444;
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Noto Sans', sans-serif;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.unsaved-changes-btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

/* ============================================ */
/*          DARK THEME                          */
/* ============================================ */

body[data-theme="dark"] .unsaved-changes-modal-content,
body.theme-dark .unsaved-changes-modal-content {
    background: rgba(30, 35, 45, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .unsaved-changes-title,
body.theme-dark .unsaved-changes-title {
    color: rgba(245, 241, 232, 0.95);
}

body[data-theme="dark"] .unsaved-changes-text,
body.theme-dark .unsaved-changes-text {
    color: rgba(229, 231, 235, 0.85);
}

body[data-theme="dark"] .unsaved-changes-btn-secondary,
body.theme-dark .unsaved-changes-btn-secondary {
    background: rgba(55, 65, 81, 0.85);
    color: rgba(229, 231, 235, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .unsaved-changes-btn-secondary:hover,
body.theme-dark .unsaved-changes-btn-secondary:hover {
    background: rgba(75, 85, 99, 0.90);
}

body[data-theme="dark"] .unsaved-changes-btn-danger,
body.theme-dark .unsaved-changes-btn-danger {
    background: rgba(239, 68, 68, 0.95);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

body[data-theme="dark"] .unsaved-changes-btn-danger:hover,
body.theme-dark .unsaved-changes-btn-danger:hover {
    background: rgba(220, 38, 38, 0.95);
}

/**
 * END UNSAVED CHANGES MODAL COMPONENT
 *
 * NOTES:
 * - Uses CSS variables for consistent theming
 * - Glassmorphism effect for modern look
 * - Theme-aware with Light, Dark, Colors support
 * - Responsive sizing for mobile devices
 * - Smooth hover effects for better UX
 * - High z-index to appear above all content
 */

/**
 * COEUS Design System - Login Page Components
 *
 * PURPOSE:
 * Styles for the login/authentication page including passkey registration
 *
 * COMPONENTS:
 * - .login-container - Full-height container for login card
 * - .login-card - Glassmorphism card with form (overrides accent color to orange)
 * - .login-logo - Logo container (displays COEUS.png without background)
 * - .passkey-button - Primary action button for passkey auth
 * - .form-input - Input field styling
 * - .notification - Toast notification system
 * - .notification-icon-* - Theme-aware notification icon colors
 * - .code-input - 6-digit verification code inputs
 * - .divider - "oder" separator with horizontal lines
 *
 * DEPENDENCIES: core/variables.css, core/themes.css, core/themes-v2.css, core/glass-system-v2.css
 *
 * LAST UPDATED: 2026-02-18 - Mobile keyboard fix:
 *               - .login-container switches from fixed to relative on mobile (≤600px)
 *               - Uses min-height: 100dvh so keyboard doesn't obscure inputs
 *               - Removed aggressive scroll prevention JS from login.html
 *
 *               2026-01-19 - Sunset Orange Input Focus:
 *               - Override --input-border-focus and --accent-primary-rgb on .login-card
 *               - Input focus/autofill now uses sunset orange (#f97316) across all themes
 *               - Works with glass-system-v2.css global input styling (no !important needed)
 *               - Readable text on autofill via -webkit-text-fill-color
 *
 *               2025-11-23 - Theme-Aware Color Fix:
 *               - All text uses theme-aware variables (works in light & dark mode)
 */

/* ============================================ */
/*              LOGIN PAGE BODY                 */
/* ============================================ */

/* Lock body on login page to prevent scroll outside the window */
body[data-page="login"] {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ============================================ */
/*              LOGIN CONTAINER                 */
/* ============================================ */

/**
 * .login-container
 * Full-screen container with centered login card
 * Uses fixed positioning with internal scroll for keyboard support
 */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-bottom: 40px;
    z-index: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================ */
/*              LOGIN CARD                      */
/* ============================================ */

/**
 * .login-card
 * Main card with glassmorphism effect (theme-aware)
 * Animated slide-up entrance
 */
.login-card {
    /* Override input colors for login page - SUNSET ORANGE focus, glass background */
    --input-border-focus: #f97316;
    --accent-primary-rgb: 249, 115, 22;
    --input-bg: var(--glass-secondary);
    --input-bg-focus: var(--glass-secondary);

    background: var(--glass-primary);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: slideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex-shrink: 0;
    margin-top: 0;
}

@media (min-width: 480px) {
    .login-card {
        padding: 40px 32px;
    }
}

/* ============================================ */
/*              LOGIN HEADER                    */
/* ============================================ */

/**
 * .login-header
 * Header section with logo and title
 */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

/**
 * .login-logo
 * Logo container - displays COEUS.png without background
 */
.login-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/**
 * .login-logo--success
 * Success state logo with green background (for onboarding complete states)
 */
.login-logo--success {
    background: var(--ios-system-green);
    margin: 0 auto 1.5rem;
    border-radius: 50%;
}

/**
 * .login-card--wide
 * Wider card variant for onboarding forms with more content
 */
.login-card--wide {
    max-width: 500px;
}

/**
 * .login-title
 * Main title text - COEUS brand logo
 * Uses Bodoni Moda to match sidebar and landing pages
 */
.login-title {
    font-family: var(--font-logo, 'Bodoni Moda'), serif; /* COEUS logo only */
    font-size: 2.125rem; /* Match sidebar-logo size */
    font-weight: 400; /* Match sidebar elegance */
    font-optical-sizing: auto;
    letter-spacing: 0.1rem; /* Match sidebar-logo spacing */
    color: var(--text-primary);
    margin: 0 0 8px;
}

/**
 * .login-subtitle
 * Subtitle text below title
 */
.login-subtitle {
    font-size: var(--ios-subheadline);
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================ */
/*              FORM ELEMENTS                   */
/* ============================================ */

/**
 * .form-group
 * Container for form fields with spacing
 */
.form-group {
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.form-group h2,
.form-group p {
    text-align: center;
}

/**
 * .form-label
 * Label for form inputs
 */
.form-label {
    display: block;
    font-size: var(--ios-footnote);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/**
 * .form-input
 * Standard text input with glassmorphism
 * Uses theme-aware input variables for proper contrast across all 5 themes
 */
.form-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: var(--ios-callout);
    color: var(--text-primary);
    box-sizing: border-box;
    text-align: center;
    -webkit-text-fill-color: var(--text-primary);
    caret-color: var(--text-primary);
    outline: none;
    /* Prevent browser autofill background flash */
    transition: background-color 9999s ease-out;
}

.form-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* Prevent iOS auto-zoom: inputs must be ≥16px on mobile */
@media (max-width: 600px) {
    .form-input,
    input.code-input {
        font-size: 16px;
    }
}

/* Autofill override - maximum specificity */
#email:-webkit-autofill,
#email:-webkit-autofill:hover,
#email:-webkit-autofill:focus,
#email:-webkit-autofill:active,
.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus,
.login-card input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--input-bg-solid, #141418) inset !important;
    box-shadow: 0 0 0 1000px var(--input-bg-solid, #141418) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    border-color: var(--ios-system-orange) !important;
    background-color: var(--input-bg-solid, #141418) !important;

    transition: background-color 9999s ease-out !important;
}

/* ============================================ */
/*              BUTTONS                         */
/* ============================================ */

/**
 * .glass-button
 * Secondary button with glassmorphism
 * Note: Primary variant defined in themes.css
 */

/**
 * .glass-button-primary
 * Primary action button with orange gradient
 */
.glass-button-primary {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: var(--text-primary) !important;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    user-select: none;
    text-decoration: none;
    font-family: var(--font-sans);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    transition: all 0.2s ease;
}

.glass-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.glass-button-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.glass-button-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    mix-blend-mode: overlay;
    pointer-events: none;
}

.glass-button-primary * {
    color: var(--text-primary) !important;
    position: relative;
    z-index: 1;
}

/**
 * .passkey-button
 * Large button for passkey authentication
 * Features gradient background and icon support
 */
.passkey-button {
    background:
        linear-gradient(135deg, #f97316 0%, #fb923c 100%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
    color: var(--text-primary) !important;
    border: none;
    border-radius: var(--radius-md);
    padding: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: var(--ios-callout);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.passkey-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    mix-blend-mode: overlay;
    pointer-events: none;
}

.passkey-button * {
    color: var(--text-primary) !important;
    position: relative;
    z-index: 1;
}

.passkey-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(249, 115, 22, 0.4);
}

/**
 * .passkey-button-green
 * Green variant for registration success
 */
.passkey-button-green {
    background:
        linear-gradient(135deg, var(--ios-system-green), #28a745),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
    margin-bottom: var(--spacing-lg);
}

/* ============================================ */
/*              PASSKEY BUTTON CONTENT          */
/* ============================================ */

.passkey-icon {
    font-size: 24px;
}

.passkey-text {
    text-align: center;
}

.passkey-title {
    font-weight: 700;
}

.passkey-subtitle {
    font-size: var(--ios-caption1);
    opacity: 0.9;
}

.fingerprint-icon {
    font-size: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============================================ */
/*              DIVIDER                         */
/* ============================================ */

/**
 * .divider
 * Separator with "oder" (or) text
 * REMOVED - Duplicate definition exists at line 532
 */

/* ============================================ */
/*              CODE INPUTS                     */
/* ============================================ */

/**
 * .code-input
 * Individual input for 6-digit verification code
 * Uses !important for width to override any inherited styles
 */
input.code-input {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: 60px;
    flex: 0 0 50px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    background: var(--glass-secondary);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

input.code-input:focus {
    border-color: #f97316;
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
    background: var(--glass-hover);
}

.code-input-centered {
    text-align: center;
    font-family: monospace;
}

/* ============================================ */
/*              VERIFICATION BOX                */
/* ============================================ */

/**
 * .verification-box
 * Container for 8-digit verification code input
 */
.verification-box {
    background: var(--ios-glass-thin);
    border: 1px solid var(--ios-separator);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: var(--spacing-lg);
}

.verification-box-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.verification-icon {
    color: var(--ios-system-orange);
    margin-top: 4px;
    font-size: 1.2rem;
}

.verification-box-text {
    flex: 1;
}

.verification-label {
    display: block;
    font-size: var(--ios-footnote);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.verification-hint {
    font-size: var(--ios-caption1);
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.error-message {
    margin-top: 8px;
    font-size: var(--ios-footnote);
    color: var(--ios-system-red);
}

/* ============================================ */
/*              NOTIFICATIONS                   */
/* ============================================ */

/**
 * .notification on login page
 * Toast notification system — scoped to login page to prevent
 * gdpr-dashboard.css generic .notification from overriding
 */
body[data-page="login"] .notification {
    position: fixed;
    top: 1.25em;
    right: 1.25em;
    bottom: auto;
    left: auto;
    z-index: var(--z-modal);
    opacity: 0;
    transform: translateY(-1.25em);
    transition: all var(--transition-base);
    background: none;
    border: none;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    max-width: 25em;
}

body[data-page="login"] .notification.show {
    opacity: 1;
    transform: translateY(0);
}

body[data-page="login"] .notification-content {
    background: var(--ios-glass-regular);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 1em 1.25em;
    display: flex;
    align-items: center;
    gap: 0.75em;
    box-shadow: var(--shadow-lg);
}

/**
 * Notification icon colors (theme-aware using iOS system colors)
 */
.notification-icon-success {
    color: var(--ios-system-green) !important;
}

.notification-icon-error {
    color: var(--ios-system-red) !important;
}

.notification-icon-info {
    color: var(--ios-system-orange) !important;
}

/* ============================================ */
/*              ANIMATIONS                      */
/* ============================================ */

/**
 * @keyframes slideUp
 * Entrance animation for login card
 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/**
 * .step-content
 * Fade-in animation for step transitions
 * Override rental-protocol.css defaults for login page
 */
.step-content {
    display: none !important; /* Hidden by default */
}

.step-content.active {
    display: block !important; /* Force visible when active */
    animation: fadeIn 0.3s ease forwards; /* Animate in and stay visible */
    opacity: 1; /* Ensure visibility after animation */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================ */
/*              UTILITY CLASSES                 */
/* ============================================ */

.btn-full-width {
    width: 100%;
}

.btn-mb-16 {
    margin-bottom: 16px;
}


/* Divider & Passkey Button Styles (Theme-aware) */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.divider span {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    text-transform: lowercase;
    padding: 0 0.5rem;
    background: transparent;
}

.passkey-button {
    width: 100%;
    padding: 1rem;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.passkey-button:hover {
    background: var(--glass-hover);
    transform: translateY(-1px);
}

.passkey-button:active {
    transform: translateY(0);
}

.fingerprint-icon {
    font-size: 1.5rem;
    color: var(--ios-system-orange);
}

/**
 * COEUS Design System - Chat Components
 *
 * PURPOSE:
 * Styles for the chat interface including messages, input area, and property cards
 * Uses TYPOGRAPHY SYSTEM with --font-scale for user preference scaling
 * ALL styling in CSS - NO inline classes in HTML
 *
 * COMPONENTS:
 * - Theme-specific backgrounds and text styling
 * - .user-name - Meddon cursive font for user names
 *   - Light theme: Deep purple-bluish (#3a4f7a)
 *   - Dark theme: White (#ffffff)
 *   - Colors theme: Uses default gradient
 * - .message-bubble - Premium glass message containers (same style as control buttons)
 *   - Glass background: rgba(255, 255, 255, 0.15) with blur(8px)
 *   - Font sizing: Uses typography system (14px at M scale = ios-callout)
 *   - Theme-aware: light (0.25 opacity), dark (rgba(28,28,30,0.4)), colors (0.2 opacity)
 *   - Proper text contrast in all themes
 * - .message-container - Flex container for message layout (no inline classes)
 * - .message-wrapper - Inner wrapper for avatar and bubble alignment
 * - .message-avatar - Avatar circles with gradient backgrounds
 *   - user-avatar: blue-purple gradient
 *   - ai-avatar: emerald-teal gradient
 *   - Responsive sizing: 2em → 2.25em
 * - .message-content - Content area with 1.6 line-height and pre-wrap
 * - .input-container - Chat input area with ChatGPT-style clean layout
 * - .property-item-card - Property display cards with glassmorphism
 * - .glass - Generic glassmorphism utility
 *
 * TYPOGRAPHY INTEGRATION:
 * - Message text: calc(var(--ios-callout-base) * var(--font-scale, 1)) = 14px at M
 * - Breakpoints: em units (48em = 768px, 64em = 1024px)
 * - Avatar sizes: em units for true responsiveness
 * - Padding: em units for responsive spacing (0.75em → 1em → 1.25em)
 *
 * DEPENDENCIES: core/variables.css, core/themes.css, typography-system.css
 * LAST UPDATED: 2025-12-15
 */

/* ============================================ */
/*        BACKGROUND IMAGES FOR THEMES         */
/* ============================================ */

/**
 * Theme-specific background images
 * Each theme has its own background image
 */
body {
    min-height: 100vh;
    background-image: url('/assets/light.jpg') !important;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

body[data-theme="lightmodern"] {
    background-image: url('/assets/lightmodern.jpg') !important;
}

body[data-theme="dark"],
body.theme-dark {
    background-image: url('/assets/dark.jpg') !important;
}

body[data-theme="darkart"] {
    background-image: url('/assets/darkart.jpg') !important;
}

body[data-theme="darkmodern"] {
    background-image: url('/assets/darkmodern.jpg') !important;
}

/* ============================================ */
/*              TYPOGRAPHY STYLES               */
/* ============================================ */

/**
 * .user-name in chat context ONLY
 * Meddon cursive font for user names in chat welcome title - ENLARGED
 * NOTE: Scoped to #welcomeTitle to avoid conflict with sidebar.css .user-name
 */
#welcomeTitle .user-name {
    font-family: "Meddon", cursive !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 1.28em !important; /* 1.28× parent size - 80% of previous size */
    line-height: 1.2 !important;
    display: inline-block !important;
    margin-left: 0.3em !important; /* Space between "Hallo" and username */
    margin-right: 0.15em !important; /* Space before "!" */
    vertical-align: baseline !important; /* Keep on same baseline as surrounding text */
}

/**
 * Large exclamation mark in welcome title
 */
#welcomeTitle .exclamation {
    font-size: 1.4em !important; /* Make "!" larger */
    font-weight: 700 !important;
}

/**
 * #welcomeTitle
 * Welcome screen title with Noto Sans KR/JP fonts
 */
#welcomeTitle {
    font-family: 'Noto Sans KR', 'Noto Serif JP', 'Noto Sans', sans-serif;
    line-height: 1.6 !important; /* Extra line-height to prevent cursive font clipping */
    padding-top: 0.3em !important; /* Additional top padding for tall ascenders */
}

/**
 * .message-content.has-table
 * Monospace font for table-like content in messages
 */
.message-content.has-table {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ============================================ */
/*          DARK THEME - TEXT STYLING           */
/* ============================================ */

/**
 * Dark theme h1 gradient effect
 * High contrast text with gradient and text shadow
 */
body[data-theme="dark"] h1,
body.theme-dark h1 {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/**
 * Fix for username in light theme - CHAT CONTEXT ONLY
 * Deep purple-bluish color for better contrast
 * NOTE: Scoped to #welcomeTitle to avoid sidebar conflict
 */
body[data-theme="light"] #welcomeTitle .user-name,
body.theme-light #welcomeTitle .user-name,
body:not([data-theme]) #welcomeTitle .user-name {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: #3a4f7a !important; /* Deep purple-bluish */
    color: #3a4f7a !important;
    font-weight: 400 !important;
}

/**
 * Fix for username in dark theme - CHAT CONTEXT ONLY
 * Prevent gradient clipping issues on user names
 * NOTE: Scoped to #welcomeTitle to avoid sidebar conflict
 */
body[data-theme="dark"] #welcomeTitle .user-name,
body.theme-dark #welcomeTitle .user-name {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    color: var(--text-primary) !important;
    font-weight: 400 !important;
}

body[data-theme="dark"] .text-gray-600,
body.theme-dark .text-gray-600 {
    color: var(--text-primary) !important;
    font-weight: 500 !important;
}

body[data-theme="dark"] .text-gray-700,
body.theme-dark .text-gray-700 {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

body[data-theme="dark"] .text-gray-900,
body.theme-dark .text-gray-900 {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}

body[data-theme="dark"] .rt-Badge,
body.theme-dark .rt-Badge {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

/* ============================================ */
/*         COLORS THEME - TEXT STYLING          */
/* ============================================ */

/* ============================================ */
/*       INPUT AREA - COEUS GLASSMORPHISM       */
/* ============================================ */

/**
 * footer.safe-area-bottom
 * Chat input area container
 * No border-radius or border for full-width footer
 */
footer.safe-area-bottom {
    position: relative;
    border-radius: 0;
    border: none;
}

/**
 * .input-container
 * Base styles for chat input container (all themes)
 * Clean layout with no visible container
 */
.input-container {
    padding: 0;
    border-radius: 0;
    align-items: center;
    gap: 0.25em;
    min-height: 3.5em;
    display: flex;
    flex-direction: row;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/**
 * Input container button alignment
 * Clean buttons without visible containers
 */
.input-container button {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0.5em;
    transition: background 0.2s;
    min-width: 2.5em;
    min-height: 2.5em;
}

.input-container button:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

.input-container button svg {
    width: 1.25em;
    height: 1.25em;
    opacity: 0.7;
}

/**
 * Model selector wrapper - part of right controls group
 * Clean gray background with rounded corners
 */
.input-container .model-selector-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex-shrink: 0;
    gap: 0.25em;
    padding: 0.5em 1em;
    border-radius: 0.75em;
    background: rgba(0, 0, 0, 0.05) !important;
    border: none;
    box-shadow: none !important;
}

/**
 * Right controls group - transparent background
 */
.input-container > div[style*="display: flex"] {
    background: transparent !important;
}

/**
 * Select element in input container
 * Centered text with clean styling
 */
.input-container select {
    align-self: center;
    height: auto;
    padding: 0;
    margin: 0;
    font-size: 0.875em;
    font-weight: 500;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    text-align: center;
}

/**
 * Option elements - remove all backgrounds
 */
.input-container select option {
    background: transparent !important;
    box-shadow: none !important;
}

/**
 * Remove any Radix UI select styling
 */
.rt-Select {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/**
 * Select label in input container
 */
.input-container label {
    margin: 0;
    font-size: 0.875em;
    font-weight: 500;
    opacity: 0.6;
}

/**
 * Textarea in input container
 * Clean, no visible background, takes most space, properly centered
 * Uses Bodoni Moda (serif) for input - matches user message bubbles
 */
.input-container textarea,
.input-container textarea#chatInput,
#chatInput {
    flex: 1;
    align-self: center;
    margin: 0;
    padding: 0.75em 0.5em !important;
    font-family: var(--font-sans) !important;
    font-size: calc(18px * var(--font-scale, 1)) !important; /* Absolute base size, scales with font-scale */
    line-height: 1.5 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    resize: none;
    min-height: 1.5em;
    color: var(--text-primary) !important;
}

.input-container textarea::placeholder {
    font-family: var(--font-sans);
    color: var(--text-tertiary);
    opacity: 1;
}

/**
 * Override Radix Card background for input container
 */
.input-container.rt-Card {
    background: transparent !important;
}

/**
 * Light Theme - Input Area
 * Coeus style glassmorphism with subtle shadows
 */
body[data-theme="light"] footer.safe-area-bottom,
html[data-theme="light"] body footer.safe-area-bottom {
    background: rgba(44, 62, 80, 0.08) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(44, 62, 80, 0.15) !important;
    box-shadow: 0 -8px 32px rgba(44, 62, 80, 0.08);
}

body[data-theme="light"] .input-container,
html[data-theme="light"] body .input-container {
    background: transparent !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(44, 62, 80, 0.15) !important;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.05);
}

/**
 * Dark Theme - Input Area
 * Enhanced contrast with stronger shadows
 */
body[data-theme="dark"] footer.safe-area-bottom,
html[data-theme="dark"] body footer.safe-area-bottom {
    background: rgba(245, 241, 232, 0.12) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(245, 241, 232, 0.2) !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .input-container,
html[data-theme="dark"] body .input-container {
    background: transparent !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(245, 241, 232, 0.25) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================ */
/*         MESSAGE BUBBLES - THEME AWARE        */
/* ============================================ */

/**
 * Message Bubble Base Styles - Premium Glass Effect
 * Same glassmorphism as control buttons
 */
.message-bubble {
    /* Premium glass background - same as chat-control-btn */
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;

    /* Rounded corners */
    border-radius: 1em !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;

    /* Typography */
    font-size: 1em;

    /* Padding */
    padding: 0.75em 1em !important;

    /* Effects */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

.message-bubble.user-message {
    border-bottom-right-radius: 0.25em !important;
}

.message-bubble.assistant-message {
    border-top-left-radius: 0.25em !important;
}

.message-bubble .message-content {
    font-size: calc(var(--ios-callout-base, 0.875rem) * var(--font-scale, 1)); /* 14px at M scale */
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-bubble p {
    font-size: calc(var(--ios-callout-base, 0.875rem) * var(--font-scale, 1)); /* 14px at M scale */
    line-height: 1.6;
    margin: 0;
}

.message-content.streaming-content {
    white-space: pre-wrap;
}

/* Ensure message content is always left-aligned (fixes flexbox inheritance) */
.message-bubble .message-content,
.message-bubble .streaming-content {
    text-align: left;
}

.message-bubble.assistant-message .message-content {
    display: block;
    text-align: left;
}

/* Ensure list items within messages are left-aligned */
.message-content ul,
.message-content ol {
    text-align: left;
    padding-left: 1.5em;
    margin: 0;
}

.message-content li {
    text-align: left;
}

/**
 * Chat Source Links - Clickable citations/sources
 */
.chat-source-link {
    color: var(--ios-system-orange);
    text-decoration: none;
    border-bottom: 1px dotted var(--ios-system-orange);
    transition: all 0.2s ease;
}

.chat-source-link:hover {
    color: var(--ios-system-indigo);
    border-bottom-style: solid;
}

/**
 * Message Avatars - Responsive sizing with em units
 */
.message-avatar {
    width: 2em;
    height: 2em;
    font-size: 0.75em;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* NOTE: .user-avatar for chat messages ONLY - scoped to .message-avatar to avoid sidebar conflict */
.message-avatar.user-avatar {
    background: linear-gradient(135deg, #FF9500, #8b5cf6) !important;
    color: var(--text-primary) !important;
}

.ai-avatar {
    background: linear-gradient(135deg, #10b981, #14b8a6) !important;
    color: var(--text-primary) !important;
}

/* Message container */
.message-container {
    display: flex;
    margin-bottom: 1.5em;
    padding: 0 1.5em;
}

.message-container.user-message {
    justify-content: flex-end;
}

/* All messages use consistent sans-serif font and typography system */
.message-container.user-message .message-content,
.message-container.user-message .message-bubble p {
    font-family: var(--font-sans);
    font-size: calc(var(--ios-callout-base, 0.875rem) * var(--font-scale, 1)); /* 14px at M scale */
}

.message-container.assistant-message {
    justify-content: flex-start;
}

/* Agent messages use same sans-serif font and typography system */
.message-container.assistant-message .message-content,
.message-container.assistant-message .streaming-content {
    font-family: var(--font-sans);
    font-size: calc(var(--ios-callout-base, 0.875rem) * var(--font-scale, 1)); /* 14px at M scale */
}

.message-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.75em;
    max-width: 85%;
}

.message-wrapper.assistant {
    align-items: flex-start;
}

/* Responsive breakpoints using em */
@media (min-width: 48em) {  /* 768px */
    .message-bubble {
        font-size: 1.05em;
        padding: 1em 1.25em !important;
    }

    .message-avatar {
        width: 2.25em;
        height: 2.25em;
        font-size: 0.8em;
    }

    .message-container {
        padding: 0 3em;
    }

    .message-wrapper {
        gap: 1em;
    }
}

@media (min-width: 64em) {  /* 1024px */
    .message-bubble {
        font-size: 1.1em;
    }

    .message-container {
        padding: 0 4em;
    }
}

/**
 * Light Theme - Message Bubbles
 * Glass effect with light background
 */
body[data-theme="light"] .message-bubble,
html[data-theme="light"] body .message-bubble {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-color: rgba(44, 62, 80, 0.15) !important;
    color: var(--text-primary, #1a202c) !important;
}

body[data-theme="light"] .message-bubble .message-content,
html[data-theme="light"] body .message-bubble .message-content {
    color: var(--text-primary, #1a202c) !important;
}

body[data-theme="light"] .message-bubble p,
html[data-theme="light"] body .message-bubble p {
    color: var(--text-primary, #1a202c) !important;
}

/**
 * Dark Theme - Message Bubbles
 * Glassmorphism with enhanced blur and proper text contrast
 */
body[data-theme="dark"] .message-bubble,
html[data-theme="dark"] body .message-bubble {
    background: rgba(28, 28, 30, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-color: var(--text-quaternary) !important;
    color: var(--text-primary) !important;
}

body[data-theme="dark"] .message-bubble .message-content,
html[data-theme="dark"] body .message-bubble .message-content,
body[data-theme="dark"] .message-bubble p,
html[data-theme="dark"] body .message-bubble p,
body[data-theme="dark"] .message-bubble .message-content *,
html[data-theme="dark"] body .message-bubble .message-content * {
    color: var(--text-primary) !important;
}

/* Code blocks in dark theme - distinct background */
body[data-theme="dark"] .message-bubble pre,
html[data-theme="dark"] body .message-bubble pre,
body[data-theme="dark"] .message-bubble code,
html[data-theme="dark"] body .message-bubble code {
    background: rgba(0, 0, 0, 0.3) !important;
    color: var(--text-primary) !important;
}

/**
 * Darkart Theme - Message Bubbles
 * Solid dark bubbles for marbled background readability
 */
body[data-theme="darkart"] .message-bubble,
html[data-theme="darkart"] body .message-bubble {
    background: rgba(20, 20, 22, 0.85) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--text-primary) !important;
}

body[data-theme="darkart"] .message-bubble .message-content,
html[data-theme="darkart"] body .message-bubble .message-content,
body[data-theme="darkart"] .message-bubble p,
html[data-theme="darkart"] body .message-bubble p,
body[data-theme="darkart"] .message-bubble .message-content *,
html[data-theme="darkart"] body .message-bubble .message-content * {
    color: var(--text-primary) !important;
}

body[data-theme="darkart"] .message-bubble pre,
html[data-theme="darkart"] body .message-bubble pre,
body[data-theme="darkart"] .message-bubble code,
html[data-theme="darkart"] body .message-bubble code {
    background: rgba(0, 0, 0, 0.4) !important;
    color: var(--text-primary) !important;
}

/**
 * Darkmodern Theme - Message Bubbles
 * Modern dark glass effect
 */
body[data-theme="darkmodern"] .message-bubble,
html[data-theme="darkmodern"] body .message-bubble {
    background: rgba(25, 25, 28, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: var(--text-primary) !important;
}

body[data-theme="darkmodern"] .message-bubble .message-content,
html[data-theme="darkmodern"] body .message-bubble .message-content,
body[data-theme="darkmodern"] .message-bubble p,
html[data-theme="darkmodern"] body .message-bubble p,
body[data-theme="darkmodern"] .message-bubble .message-content *,
html[data-theme="darkmodern"] body .message-bubble .message-content * {
    color: var(--text-primary) !important;
}

body[data-theme="darkmodern"] .message-bubble pre,
html[data-theme="darkmodern"] body .message-bubble pre,
body[data-theme="darkmodern"] .message-bubble code,
html[data-theme="darkmodern"] body .message-bubble code {
    background: rgba(0, 0, 0, 0.35) !important;
    color: var(--text-primary) !important;
}

/* ============================================ */
/*            INPUT FIELD STYLING               */
/* ============================================ */

/**
 * #chatInput placeholder
 * Ellipsis overflow for long placeholder text
 */
#chatInput::placeholder {
    color: var(--text-tertiary);
    opacity: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/**
 * #chatInput text color and sizing
 * Uses theme-aware primary text color
 * 16px font-size prevents iOS auto-zoom on focus
 */
#chatInput {
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.5;
}

/* ============================================ */
/*         CHAT MESSAGES POSITIONING            */
/* ============================================ */

/**
 * Chat messages container
 * Add bottom padding to prevent input container from covering last message
 */
#chatMessages {
    padding-bottom: 8em !important; /* Space for fixed input container */
}

/**
 * Position first message at 20% from top
 * Creates breathing room at top of chat
 */
#chatMessages > div:first-child:not(#welcomeScreen) {
    margin-top: 20vh !important;
}

/* ============================================ */
/*          VOICE RECORDING STATE               */
/* ============================================ */

/**
 * #voiceBtn.recording
 * Pulsing red animation for active recording
 */
#voiceBtn.recording {
    animation: pulse-red 1.5s ease-in-out infinite;
    color: #ef4444 !important;
}

@keyframes pulse-red {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* ============================================ */
/*          PROPERTY ITEM CARDS                 */
/* ============================================ */

/**
 * .property-item-card
 * Property display cards with glassmorphism
 * Matches document-card style from cards.css
 */
.property-item-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
}

.property-item-card:hover {
    transform: translateY(-4px);
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.3), 0 8px 16px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.12);
}

/**
 * .glass
 * Generic glassmorphism utility
 */
.glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/**
 * .property-list-container
 * Container for lists of property cards
 */
.property-list-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ============================================ */
/*        RESPONSIVE - PROPERTY CARDS           */
/* ============================================ */

/**
 * Mobile responsive styles for property cards
 * Reduces padding on smaller screens
 */
@media (max-width: 768px) {
    .property-item-card {
        padding: 0.75rem;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .property-item-card {
        padding: 0.6rem;
    }
}

/**
 * @file collaborative-chat.css
 * @filepath public/css/components/collaborative-chat.css
 * @description Styles for collaborative chat features (participants, mentions, notifications)
 * @created 2025-12-15
 *
 * Features:
 * - Participant indicators (stacked avatars)
 * - Agent mode toggle
 * - Add participants modal
 * - Member list styling
 * - Theme-aware colors
 */

/* ============================================================================
   COLLABORATIVE CONTROLS CONTAINER
   ============================================================================ */

.collaborative-controls {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.collaborative-controls.hidden {
    display: none;
}

/* ============================================================================
   PARTICIPANT INDICATORS (Stacked Avatars)
   ============================================================================ */

.participant-indicators {
    display: flex;
    align-items: center;
    margin-left: 0.5em;
}

.participant-avatar {
    width: 1.75em;
    height: 1.75em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65em;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--glass-secondary);
    border: 2px solid var(--glass-primary);
    margin-left: -0.5em;
    position: relative;
    cursor: default;
    transition: transform 0.15s ease;
}

.participant-avatar:first-child {
    margin-left: 0;
}

.participant-avatar:hover {
    transform: scale(1.1);
    z-index: 10 !important;
}

.participant-avatar.participant-overflow {
    background: var(--ios-system-orange);
    color: var(--text-primary);
    font-size: 0.6em;
}

/* ============================================================================
   AGENT MODE TOGGLE
   ============================================================================ */

.agent-mode-container {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.agent-mode-container.hidden {
    display: none;
}

.agent-mode-select {
    appearance: none;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.35em 2em 0.35em 0.75em;
    font-size: 0.75em;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5em center;
}

.agent-mode-select:hover {
    background-color: var(--glass-hover);
    border-color: var(--text-tertiary);
}

.agent-mode-select:focus {
    outline: none;
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.15);
}

/* ============================================================================
   ADD PARTICIPANTS MODAL
   ============================================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1em;
}

.modal-overlay.hidden {
    display: none;
}

.modal-container {
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: modal-slide-in 0.2s ease-out;
}

.modal-container.modal-md {
    max-width: 28em;
}

@keyframes modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-1em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.1em;
}

.modal-close-btn {
    background: transparent;
    border: none;
    padding: 0.5em;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 0.5em;
    transition: all 0.15s ease;
}

.modal-close-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1em 1.25em;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75em;
    padding: 1em 1.25em;
    border-top: 1px solid var(--glass-border);
}

/* ============================================================================
   PARTICIPANT SEARCH INPUT
   ============================================================================ */

.participant-search-input {
    width: 100%;
    padding: 0.75em 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    font-size: 0.9em;
    color: var(--text-primary);
    margin-bottom: 1em;
    transition: all 0.2s ease;
}

.participant-search-input::placeholder {
    color: var(--text-tertiary);
}

.participant-search-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.15);
}

/* ============================================================================
   MEMBER LIST
   ============================================================================ */

.member-list {
    max-height: 20em;
    overflow-y: auto;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em;
    border-radius: 0.5em;
    cursor: pointer;
    transition: background 0.15s ease;
}

.member-item:hover {
    background: var(--glass-hover);
}

.member-item input[type="checkbox"] {
    width: 1.1em;
    height: 1.1em;
    accent-color: var(--ios-system-orange);
    cursor: pointer;
}

.member-avatar {
    width: 2.25em;
    height: 2.25em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--glass-secondary);
    flex-shrink: 0;
}

.member-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15em;
}

.member-name {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-email {
    font-size: 0.75em;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================================
   LOADING / EMPTY / ERROR STATES
   ============================================================================ */

.loading-indicator,
.empty-message,
.error-message {
    padding: 2em;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.error-message {
    color: var(--ios-system-red);
}

/* ============================================================================
   GLASS BUTTON STYLES (for modal)
   ============================================================================ */

.glass-button {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.6em 1.25em;
    font-size: 0.85em;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.glass-button:hover {
    background: var(--glass-hover);
}

.glass-button.primary {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
    color: var(--text-primary);
}

.glass-button.primary:hover {
    background: #E68600;
    border-color: #E68600;
}

/* ============================================================================
   MENTION AUTOCOMPLETE DROPDOWN
   ============================================================================ */

/* ============================================================================
   CONTENTEDITABLE INPUT WITH INLINE MENTIONS
   ============================================================================ */

.chat-input-editable {
    min-height: 1.5em;
    max-height: 12em;
    overflow-y: auto;
    outline: none;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Placeholder for contenteditable */
.chat-input-editable:empty::before {
    content: attr(data-placeholder);
    color: var(--text-tertiary);
    pointer-events: none;
}

/* Inline mention styling - User mentions */
.mention-inline {
    color: #f97316;
    font-weight: 600;
    cursor: default;
}

/* Inline mention styling - COEUS AI */
.mention-inline.mention-coeus {
    color: #f97316;
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    font-style: italic;
}

/* Minimal dropdown for autocomplete suggestions */
.mention-dropdown {
    position: fixed;
    min-width: 10em;
    max-width: 16em;
    max-height: 8em;
    overflow-y: auto;
    background: var(--glass-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    padding: 0.25em 0;
}

.mention-dropdown.hidden {
    display: none;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.75em;
    cursor: pointer;
    transition: background 0.1s ease;
}

.mention-item:hover,
.mention-item.selected {
    background: var(--glass-hover);
}

.mention-item.coeus {
    color: var(--ios-system-green);
}

.mention-item .mention-avatar {
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6em;
    font-weight: 600;
    background: var(--glass-secondary);
}

.mention-item.coeus .mention-avatar {
    background: var(--ios-system-green);
    color: var(--text-primary);
}

.mention-item .mention-name {
    flex: 1;
    font-size: 0.85em;
}

.mention-item .mention-type {
    font-size: 0.7em;
    color: var(--text-tertiary);
}

/* ============================================================================
   MESSAGE SENDER ATTRIBUTION (Multi-user chats)
   ============================================================================ */

.message-sender-name {
    font-size: 0.75em;
    color: var(--text-secondary);
    margin-bottom: 0.25em;
    font-weight: 500;
}

/* ============================================================================
   NOTIFICATION BELL (to be used with notification-manager.js)
   ============================================================================ */

.notification-bell-container {
    position: relative;
}

.notification-bell {
    background: transparent;
    border: none;
    padding: 0.5em;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 0.5em;
    transition: all 0.15s ease;
}

.notification-bell:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 1.1em;
    height: 1.1em;
    padding: 0 0.3em;
    background: var(--ios-system-red);
    color: var(--text-primary);
    font-size: 0.65em;
    font-weight: 600;
    border-radius: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-badge.hidden {
    display: none;
}

/* ============================================================================
   NOTIFICATION PANEL
   ============================================================================ */

.notification-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 20em;
    max-height: 24em;
    background: var(--glass-primary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 0.5em;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-panel.hidden {
    display: none;
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75em 1em;
    border-bottom: 1px solid var(--glass-border);
}

.notification-panel-header h3 {
    margin: 0;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-primary);
}

.mark-all-read-btn {
    background: transparent;
    border: none;
    padding: 0.35em 0.5em;
    font-size: 0.75em;
    color: var(--ios-system-orange);
    cursor: pointer;
    border-radius: 0.25em;
    transition: background 0.15s ease;
}

.mark-all-read-btn:hover {
    background: var(--glass-hover);
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 20em;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
    padding: 0.75em 1em;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--glass-border);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--glass-hover);
}

.notification-item.unread {
    background: rgba(255, 149, 0, 0.08);
}

.notification-item.unread:hover {
    background: rgba(255, 149, 0, 0.12);
}

.notification-icon {
    width: 2em;
    height: 2em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    background: var(--glass-secondary);
    color: var(--text-primary);
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.15em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    font-size: 0.75em;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.7em;
    color: var(--text-tertiary);
    margin-top: 0.25em;
}

.notification-empty,
.notification-loading,
.notification-error {
    padding: 2em;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85em;
}

.notification-error {
    color: var(--ios-system-red);
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

.notification-toast {
    position: fixed;
    bottom: 1.5em;
    right: 1.5em;
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
    padding: 1em 1.25em;
    background: var(--glass-primary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    max-width: 20em;
    cursor: pointer;
    animation: toast-slide-in 0.3s ease-out;
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(2em);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-toast.toast-exit {
    animation: toast-slide-out 0.3s ease-in forwards;
}

@keyframes toast-slide-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(2em);
    }
}

.toast-icon {
    width: 2em;
    height: 2em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    background: var(--ios-system-orange);
    color: var(--text-primary);
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.15em;
}

.toast-message {
    font-size: 0.75em;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-close {
    background: transparent;
    border: none;
    padding: 0.25em;
    font-size: 1.1em;
    color: var(--text-tertiary);
    cursor: pointer;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.toast-close:hover {
    opacity: 1;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 48em) {
    .collaborative-controls {
        gap: 0.35em;
    }

    .participant-avatar {
        width: 1.5em;
        height: 1.5em;
        font-size: 0.6em;
    }

    .agent-mode-select {
        font-size: 0.7em;
        padding: 0.3em 1.75em 0.3em 0.5em;
    }

    .modal-container.modal-md {
        max-width: 100%;
    }

    .notification-panel {
        width: 100%;
        max-width: 100vw;
        right: -0.5em;
        left: -0.5em;
    }

    .notification-toast {
        left: 1em;
        right: 1em;
        bottom: 1em;
        max-width: none;
    }
}

/* ============================================================================
   THINKING SECTION (Extended Thinking Display)
   ============================================================================ */

.thinking-section {
    background: var(--glass-primary);
    border-radius: 0.5em;
    margin-bottom: 0.75em;
    overflow: hidden;
    font-size: 0.85em;
}

.thinking-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.75em;
    cursor: pointer;
    color: var(--text-secondary);
    user-select: none;
}

.thinking-header:hover {
    background: var(--glass-hover);
}

.thinking-icon {
    font-size: 1em;
}

.thinking-label {
    flex: 1;
    font-style: italic;
}

.thinking-toggle {
    transition: transform 0.2s ease;
}

.thinking-section.expanded .thinking-toggle {
    transform: rotate(180deg);
}

.thinking-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 0.75em;
    color: var(--text-tertiary);
    font-family: var(--font-mono, monospace);
    font-size: 0.9em;
    white-space: pre-wrap;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.thinking-section.expanded .thinking-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5em 0.75em;
}

/**
 * COEUS Design System - Property Creator Component
 *
 * PURPOSE:
 * Comprehensive styles for the property creator and editor interface
 * Includes property cards, floor sections, unit grids, and form elements
 *
 * COMPONENTS:
 * - .property-list-container - Main container for property list
 * - .property-item-card - Individual property cards with glassmorphism
 *   - Increased bottom padding (1.5rem) to accommodate larger font sizes
 *   - Auto height with min-height: 150px to expand with content
 *   - overflow: hidden to keep content within card boundaries
 *   - .property-card-with-bg - Cards with background images (white text)
 *   - .property-card-no-bg - Cards without backgrounds (theme colors)
 *   - .property-card-content - Flex column wrapper for card content (0.625rem gap)
 *   - .property-stats-container - Stats wrapper with extra top margin (0.375rem)
 * - .property-layout-grid - Two-column grid (25% sidebar / 75% main content)
 * - .property-editor-wrapper - Editor layout wrapper
 * - .property-tab-nav - Tab navigation bar with glassmorphism + 4px padding (matches documents-simple.html)
 * - .property-tab-btn - Tab buttons with glass morphism, sunset orange active state, hover effects
 * - .property-save-btn - Glass morphism save button with green gradient tint and elevation hover
 * - .property-delete-btn - Glass morphism delete button with red gradient tint and elevation hover
 * - .floor-section-glass - Floor sections with glassmorphism (em-based, theme-aware)
 * - .unit-card-glass - Individual unit cards (em-based, theme-aware)
 * - .unit-grid - Unit grid layout (em-based gap)
 * - .collapse-toggle - Collapsible section controls
 * - .notes-dropdown - Notes management interface (em-based)
 * - .statistics-card - Dynamic theme-aware statistics card
 * - .building-photo-gallery - Instagram-style photo carousel (no container wrapper)
 * - .photo-carousel-container - Carousel wrapper
 * - .photo-carousel-track - Horizontal sliding track
 * - .photo-carousel-nav - Previous/Next navigation buttons (always visible)
 * - .photo-carousel-indicators - Dot indicators at top center
 * - .photo-carousel-counter - Photo counter at top right
 * - .photo-upload-btn - Floating upload button at bottom right
 * - .photo-item - Individual carousel slide with photo (cover fit)
 * - Form elements with glassmorphism styling
 *
 * LAYOUT:
 * - Grid: 25fr sidebar / 75fr main content (wider units column)
 * - Gap: 0.75rem between columns (reduced for more space)
 *
 * TYPOGRAPHY:
 * - All font sizes use em-based units for scalability
 * - Respects user browser font size preferences
 * - Scales proportionally with parent element
 * - Standard body size: 1em (inherits from parent)
 *
 * THEME SUPPORT:
 * - Dynamic color inheritance for light/dark themes
 * - NO inline styles - CSS custom properties for dynamic backgrounds
 * - Background images via --card-bg-image CSS variable
 * - Em-based font sizing for responsive typography
 * - Theme-aware navigation, cards, units, and buttons
 * - Full responsiveness across screen sizes
 * - WCAG AAA compliant contrast ratios
 *
 * DEPENDENCIES: core/variables.css, core/themes.css
 * LAST UPDATED: 2026-03-13 - Removed 147 illegal !important declarations; replaced with specificity
 *                techniques: double-class selectors (.cls.cls), ID+class (#id.cls), parent context
 *                (body[data-theme] .cls), attribute selectors (.cls input[type]). Kept only 8
 *                legitimate !important uses: flex-basis carousel, object-fit, orientation lock
 *                display overrides, and prefers-reduced-motion animation override.
 */

/* ============================================ */
/*              TAB NAVIGATION                  */
/*   Property editor tab navigation            */
/* ============================================ */

/**
 * .property-tab-nav
 * Glassmorphism navigation bar for editor tabs (matches documents-simple.html view-toggle)
 */
.property-tab-nav {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 27px;
    padding: 4px;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
}

/**
 * .property-tab-btn
 * Individual tab button with glass morphism style (matches documents-simple.html view-btn)
 */
.property-tab-btn {
    flex: 1;
    padding: 0.5rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 27px;
    cursor: pointer;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 500;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(0, 0, 0, 0.7);
    transition: all 0.2s;
    white-space: nowrap;
}

.property-tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(0, 0, 0, 0.85);
}

.property-tab-btn.active {
    background: rgba(255, 255, 255, 0.25);
    color: rgba(0, 0, 0, 0.95);
    font-weight: 600;
    /* Sunset orange gradient glow effect - like a lamp from behind */
    box-shadow:
        inset 0 1px 0px rgba(255, 255, 255, 0.4),
        0 0 20px rgba(255, 94, 58, 0.4),
        0 0 40px rgba(255, 179, 71, 0.2),
        0 2px 8px rgba(255, 94, 58, 0.3);
}

/**
 * .property-save-btn
 * Green save button with glass morphism
 */
.property-save-btn {
    flex: 0.8;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.25));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 27px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0px rgba(255, 255, 255, 0.3),
        0 4px 6px rgba(34, 197, 94, 0.15);
    transition: all 0.2s;
}

.property-save-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0px rgba(255, 255, 255, 0.4),
        0 6px 12px rgba(34, 197, 94, 0.2);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.3));
}

/**
 * .property-delete-btn
 * Red delete button with glass morphism
 */
.property-delete-btn {
    flex: 0.8;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.25));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 27px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0px rgba(255, 255, 255, 0.3),
        0 4px 6px rgba(239, 68, 68, 0.15);
    transition: all 0.2s;
}

.property-delete-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0px rgba(255, 255, 255, 0.4),
        0 6px 12px rgba(239, 68, 68, 0.2);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.3));
}

/* ============================================ */
/*           PROPERTY EDITOR LAYOUTS            */
/*   Grid and flex layouts for editor          */
/* ============================================ */

/**
 * .property-details-grid
 * Layout: Left column has 2 rows (Infos + Notizen), Right column spans full height (Photos)
 * Using .property-details-grid.property-details-grid double-class for specificity 0,2,0
 */
.property-details-grid.property-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.75em;
    margin-bottom: 0.75em;
    max-width: 100%;
    overflow: hidden;
    min-height: 600px;
}

/* Notes table spans both rows in right column */
.property-details-grid > .property-grid-bottom-left {
    grid-row: 1 / 3;
}

/**
 * Grid area utilities for property editor
 */
.property-grid-top-left {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    overflow: hidden;
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Info Field Groups - Better Visual Hierarchy */
.info-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

/* Address Input Row Layout - Two column fields */
.info-field-group .flex.gap-2 {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    width: 100%;
}

/* Strasse/Stadt fields - take remaining space */
.info-field-group .flex.gap-2 input#propertyStrasse,
.info-field-group .flex.gap-2 input#propertyStadt {
    flex: 1 1 0%;
    min-width: 0;
}

/* Nr./PLZ fields - fixed narrow width */
.info-field-group .flex.gap-2 input#propertyNummer {
    flex: 0 0 5rem;
    width: 5rem;
    max-width: 5rem;
}

.info-field-group .flex.gap-2 input#propertyPLZ {
    flex: 0 0 6rem;
    width: 6rem;
    max-width: 6rem;
}

.info-field-label {
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0, 0, 0, 0.6);
    margin: 0;
}

/* Dark theme label color */
body[data-theme="dark"] .info-field-label,
body.theme-dark .info-field-label {
    color: rgba(245, 241, 232, 0.7);
}

.property-grid-right {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    overflow: visible;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.property-grid-bottom-left {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.75em 1em;
    box-sizing: border-box;
}

/**
 * .building-photo-gallery
 * Photo gallery carousel layout - Instagram-style
 * Now takes full grid cell without container wrapper
 *
 * CSS SPECIFICITY APPROACH:
 * Using combined selector with ID + classes (specificity: 1,2,0)
 * naturally overrides grid defaults without excessive !important usage
 */

/* High-specificity combined selector - ID + 2 classes = 1,2,0 specificity */
#buildingPhotosGallery.building-photo-gallery.property-grid-right {
    /* Photo grid layout - Instagram style */
    /* CSS variable for dynamic zoom */
    --photo-grid-min-size: 120px;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--photo-grid-min-size), 1fr));
    grid-auto-rows: min-content;
    /* Equal spacing horizontally and vertically */
    column-gap: 0.5em;
    row-gap: 0.5em;
    padding: 1em;

    /* Scrollable container fills grid cell exactly - compensate for border */
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
    align-content: start;
    margin: 0 0 -2px 0;

    /* Glass styling with shiny subtle border */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 0.75em;
    border: 1px solid transparent;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(200, 200, 220, 0.6), rgba(255, 255, 255, 0.8));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    /* Grid cell positioning - swapped to bottom-left */
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
}

/* Photo grid items - natural aspect ratio */
#buildingPhotosGallery > div {
    /* Let images determine height naturally */
    width: 100%;
    height: auto;
}

/* Floating upload button - Instagram style */
.photo-upload-btn {
    position: absolute;
    bottom: 1em;
    right: 1em;
    background: rgba(59, 130, 246, 0.95);
    backdrop-filter: blur(12px);
    color: white;
    border: none;
    width: 3em;
    height: 3em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    transition: all 0.2s ease;
    font-size: 1em;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.photo-upload-btn:hover {
    background: rgba(37, 99, 235, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.photo-upload-btn svg {
    width: 1.5em;
    height: 1.5em;
}

/* Carousel container - fills entire gallery with absolute positioning */
.photo-carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 0.75em;
    overflow: hidden;
}

/* Carousel track - horizontal flex container for slides */
.photo-carousel-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    /* Do NOT set width - let flex children determine track width (3 photos × 100% = 300%) */
    position: absolute;
    top: 0;
    left: 0;
}

/* Carousel navigation buttons - Instagram style */
.photo-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    color: #262626;
    border: none;
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    font-size: 1.125em;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    opacity: 1;
}

.photo-carousel-nav:hover:not(.disabled) {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.photo-carousel-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.photo-carousel-prev {
    left: 1em;
}

.photo-carousel-next {
    right: 1em;
}

/* Photo counter - Instagram style */
.photo-carousel-counter {
    position: absolute;
    top: 1em;
    right: 1em;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.4em 0.8em;
    border-radius: 1.25em;
    font-size: 0.875em;
    font-weight: 600;
    z-index: 11;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Carousel indicators - Instagram style */
.photo-carousel-indicators {
    position: absolute;
    top: 1em;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.375em;
    z-index: 10;
}

.photo-carousel-indicator {
    width: 0.375em;
    height: 0.375em;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    padding: 0;
}

.photo-carousel-indicator.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.15);
}

.photo-carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/**
 * .building-notes-list
 * Notes list styling (legacy)
 */
.building-notes-list {
    list-style: disc;
    padding-left: 1.5rem;
    color: rgba(55, 65, 81, 0.9);
}

.building-notes-list li.empty {
    list-style: none;
    padding-left: 0;
}

/**
 * .building-notes-table
 * Sortable table for building and unit notes
 */
.building-notes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75em;
}

.building-notes-table thead {
    background: var(--glass-secondary, rgba(0, 0, 0, 0.05));
    position: sticky;
    top: 0;
    z-index: 10;
}

.building-notes-table thead th {
    padding: 0.5em 0.75em;
    text-align: left;
    font-weight: 600;
    font-size: 0.875em;
    color: var(--text-primary, rgba(0, 0, 0, 0.85));
    border-bottom: 2px solid var(--glass-border, rgba(0, 0, 0, 0.15));
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.building-notes-table thead th:hover {
    background: var(--glass-hover, rgba(0, 0, 0, 0.1));
}

.building-notes-table thead th .sort-indicator {
    margin-left: 0.25em;
    color: var(--text-tertiary, rgba(0, 0, 0, 0.5));
    font-size: 0.875em;
}

.building-notes-table tbody tr {
    border-bottom: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    transition: background 0.15s ease;
}

.building-notes-table tbody tr:hover {
    background: var(--glass-hover, rgba(0, 0, 0, 0.03));
}

.building-notes-table tbody td {
    padding: 0.625em 0.75em;
    color: var(--text-primary, rgba(0, 0, 0, 0.85));
    font-size: 1em;
    vertical-align: top;
}

.building-notes-table tbody td:first-child {
    font-weight: 400;
    max-width: 25em;
    word-wrap: break-word;
}

.building-notes-table tbody td:nth-child(2) {
    color: var(--text-secondary, rgba(0, 0, 0, 0.7));
    white-space: nowrap;
}

.building-notes-table tbody td:nth-child(3) {
    color: var(--text-secondary, rgba(0, 0, 0, 0.7));
    white-space: nowrap;
    font-family: 'Figtree', sans-serif;
}

.building-notes-table tbody td:last-child {
    text-align: center;
    width: 2.5em;
}

.building-notes-table tbody button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.125em 0.375em;
    transition: color 0.15s ease;
}

/* Clickable unit cell styling */
.building-notes-table .unit-cell-clickable {
    cursor: pointer;
    color: var(--ios-system-blue, #007AFF);
    transition: all 0.15s ease;
    user-select: none;
}

.building-notes-table .unit-cell-clickable:hover {
    background: var(--glass-hover, rgba(0, 122, 255, 0.08));
    text-decoration: underline;
}

.building-notes-table .unit-cell-clickable:active {
    background: var(--glass-hover, rgba(0, 122, 255, 0.15));
}

/* Unit dropdown menu styling */
.unit-dropdown-menu {
    font-family: 'Figtree', sans-serif;
}

.unit-dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.unit-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.unit-dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--glass-border, rgba(0, 0, 0, 0.2));
    border-radius: 4px;
}

.unit-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--glass-border, rgba(0, 0, 0, 0.3));
}

.unit-dropdown-option:active {
    background: var(--glass-hover, rgba(0, 0, 0, 0.15));
}

/**
 * .add-note-btn
 * Compact green + button for adding notes
 */
.add-note-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 0.25em;
    cursor: pointer;
    font-size: 1.125em;
    font-weight: bold;
    line-height: 1;
    padding: 0;
    transition: background 0.2s ease;
}

.add-note-btn:hover {
    background: #16a34a;
}

/**
 * Address field flex utilities
 * For the street/number/PLZ row layout
 */
.address-street {
    flex: 0 1 45%;
}

.address-number {
    width: 60px;
    flex-shrink: 0;
}

/* ============================================ */
/*         FLOORS SECTION COMPONENTS            */
/*   Floor management UI elements              */
/* ============================================ */

/**
 * .floors-section-container
 * Main container for floors and units section
 */
.floors-section-container {
    padding: 0.75rem 1rem;
    width: 100%;
}

/**
 * .add-floor-btn
 * Orange gradient button for adding floors
 * Matches new property button styling
 * Double-class selector for specificity 0,2,0 to override .property-main-content button
 */
.add-floor-btn.add-floor-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875em;
    min-height: auto;
    background: linear-gradient(135deg, #ff7849 0%, #ff6b35 25%, #ff5722 50%, #f4511e 75%, #e64a19 100%);
    color: white;
    border: none;
    border-radius: 0.5em;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-weight: 600;
    box-shadow: 0 0.125em 0.5em rgba(255, 107, 53, 0.3);
}

.add-floor-btn:hover {
    background: linear-gradient(135deg, #ff8a5b 0%, #ff7849 25%, #ff6b35 50%, #ff5722 75%, #f4511e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.add-floor-btn:active {
    transform: translateY(0);
}

/**
 * .tab-section-container
 * Standard padding for tab content sections
 */
.tab-section-container {
    padding: 1rem 1.5rem;
}
        /* Prevent horizontal scrolling */
        * {
            box-sizing: border-box;
}

        html, body {
            overflow-x: hidden;
            max-width: 100%;
            width: 100%;
}

        /* Property list container - Base responsive height */
        .property-list-container {
            display: flex;
            flex-direction: column;
            flex: 1;
            min-height: 0;
            overflow: hidden;
}

        /* Property editor wrapper */
        .property-editor-wrapper {
            overflow-y: auto;
            padding-right: 0.5rem;
}

        /* Property-specific glass card styles */
        .property-item-card {
            background: rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 27px;
            padding: 1.25rem 1.125rem 1.5rem 1.125rem; /* Increased bottom padding for larger fonts */
            box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
            transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            cursor: pointer;
            position: relative;
            margin-bottom: 0.875rem;
            /* Dynamic color - set by theme */
            /* Ensure text wraps properly */
            word-wrap: break-word;
            overflow-wrap: break-word;
            /* Allow card to grow with content */
            min-height: 150px;
            height: auto;
            /* Clip overflow to card boundaries */
            overflow: hidden;
}

        /* Property card content wrapper - flex column layout with proper spacing */
        .property-card-content {
            display: flex;
            flex-direction: column;
            gap: 0.625rem; /* Slightly larger gap for breathing room */
}

        /* Property stats container - ensure proper spacing */
        .property-stats-container {
            margin-top: 0.375rem; /* Extra space above stats */
}

        /* Add top padding to first property card */
        .property-list-container .property-item-card:first-child {
            padding-top: 2rem;
            margin-top: 1rem;
}

        /* Cards WITH background images - always white text */
        .property-item-card.property-card-with-bg {
            color: white;
            background-image: var(--card-bg-image, none);
            background-size: cover;
            background-position: center;
            position: relative;
}

        /* Add dark gradient overlay via pseudo-element */
        .property-item-card.property-card-with-bg::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
            border-radius: inherit;
            z-index: 0;
            pointer-events: none;
}

        /* Ensure content is above overlay */
        .property-item-card.property-card-with-bg > * {
            position: relative;
            z-index: 1;
}

        .property-item-card.property-card-with-bg h4,
        .property-item-card.property-card-with-bg p,
        .property-item-card.property-card-with-bg span {
            color: white;
}

        .property-item-card.property-card-with-bg svg {
            color: white;
            stroke: white;
}

        /* Cards WITHOUT background images - use theme colors */
        .property-item-card.property-card-no-bg h4,
        .property-item-card.property-card-no-bg p,
        .property-item-card.property-card-no-bg span {
            color: inherit;
}

        .property-item-card.property-card-no-bg svg {
            color: inherit;
            stroke: currentColor;
}

        .property-item-card h4,
        .property-item-card p {
            /* Ensure text shows fully */
            white-space: normal;
            overflow: visible;
            text-overflow: clip;
}

        .property-item-card:hover {
            transform: translateY(-4px);
            box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.3), 0 8px 16px rgba(0, 0, 0, 0.15);
            background: rgba(255, 255, 255, 0.12);
}

        /* Property stat labels - hidden by default, visible on hover */
        .property-stat-item .stat-label {
            display: none;
            transition: opacity 0.2s ease;
}

        .property-stat-item:hover .stat-label {
            display: inline;
}

        /* Corner-positioned stat indicators */
        .property-stat-floor,
        .property-stat-unit {
            position: absolute;
            display: flex;
            align-items: center;
            gap: 0.375rem; /* 6px */
            font-size: 0.875rem; /* 14px */
            z-index: 2; /* Above background overlay */
}

        /* Floor indicator - top right corner */
        .property-stat-floor {
            top: 1.25rem; /* Match card padding-top */
            right: 1.125rem; /* Match card padding-right */
}

        /* Unit indicator - bottom right corner */
        .property-stat-unit {
            bottom: 1.5rem; /* Match card padding-bottom */
            right: 1.125rem; /* Match card padding-right */
}

        /* Stat icon sizing */
        .property-stat-floor .stat-icon,
        .property-stat-unit .stat-icon {
            width: 1.125rem; /* 18px */
            height: 1.125rem;
}

        /* Stat value styling */
        .property-stat-floor .stat-value,
        .property-stat-unit .stat-value {
            font-weight: 600;
            font-size: 1rem; /* 16px */
}

        /* Generic glass container for statistics and list containers */
        .glass {
            background: rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
            transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

        .floor-section-glass {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: rgba(245, 241, 232, 0.95);
}

        .unit-card-glass {
            background: rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.06);
            color: rgba(245, 241, 232, 0.95);
}

        /* Unit status modifiers - Green border for occupied units */
        .unit-card-glass.unit-occupied {
            border: 2px solid rgba(34, 197, 94, 0.8);
            box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2),
                        0 2px 4px rgba(0, 0, 0, 0.06),
                        0 0 0 1px rgba(34, 197, 94, 0.3);
}

        /* Yellow border for maintenance units */
        .unit-card-glass.unit-maintenance {
            border: 2px solid rgba(234, 179, 8, 0.8);
            box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2),
                        0 2px 4px rgba(0, 0, 0, 0.06),
                        0 0 0 1px rgba(234, 179, 8, 0.3);
}

        /* Collapsible functionality */
        .collapse-toggle {
            cursor: pointer;
            transition: transform 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 24px;
            height: 24px;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.3);
}

        .collapse-toggle:hover {
            background: rgba(255, 255, 255, 0.3);
}

        .collapse-toggle.collapsed {
            transform: rotate(-90deg);
}

        .collapsible-content {
            overflow: hidden;
            transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
            max-height: 10000px;
            opacity: 1;
}

        .collapsible-content.collapsed {
            max-height: 0;
            opacity: 0;
            margin: 0;
}

        .unit-card-collapsible {
            overflow: hidden;
            transition: max-height 0.3s ease, opacity 0.3s ease;
            max-height: 5000px;
            opacity: 1;
}

        .unit-card-collapsible.collapsed {
            max-height: 0;
            opacity: 0;
}

        /* Notes dropdown styles */
        .notes-dropdown {
            position: relative;
            display: inline-block;
}
        .notes-content {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            z-index: 1000;
            min-width: 300px;
            max-width: 400px;
            margin-top: 4px;
            padding: 12px;
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
        .notes-content.active {
            display: block;
}
        .notes-btn {
            background: rgba(59, 130, 246, 0.1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(59, 130, 246, 0.3);
            color: #3b82f6;
            padding: 6px 12px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.875em;
}
        .notes-btn:hover {
            background: rgba(59, 130, 246, 0.2);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
        .notes-text {
            color: inherit;
            opacity: 0.85;
            font-size: 0.875em;
            line-height: 1.5;
            white-space: pre-wrap;
            word-wrap: break-word;
}
        .notes-empty {
            color: inherit;
            opacity: 0.6;
            font-style: italic;
            font-size: 0.875em;
}

        /* Unit Action Button Styles - Theme-aware with glass morphism */
        .unit-notes-btn {
            background: var(--glass-primary);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            color: var(--text-primary);
            padding: 0.5em 0.75em;
            border-radius: 0.5em;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.875em;
            display: flex;
            align-items: center;
            gap: 0.5em;
}

        .unit-notes-btn:hover {
            background: var(--glass-hover);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

        .unit-occupancy-btn {
            background: var(--glass-primary);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            color: var(--text-primary);
            padding: 0.5em 1em;
            border-radius: 0.5em;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.875em;
}

        .unit-occupancy-btn:hover {
            background: var(--glass-hover);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

        .unit-occupancy-btn.occupied {
            background: rgba(239, 68, 68, 0.1);
            border-color: rgba(239, 68, 68, 0.3);
            color: #ef4444;
}

        .unit-occupancy-btn.occupied:hover {
            background: rgba(239, 68, 68, 0.2);
}

        .unit-occupancy-btn.vacant {
            background: rgba(34, 197, 94, 0.1);
            border-color: rgba(34, 197, 94, 0.3);
            color: #22c55e;
}

        .unit-occupancy-btn.vacant:hover {
            background: rgba(34, 197, 94, 0.2);
}

        .unit-pet-btn {
            background: var(--glass-primary);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            padding: 0.75em 1.25em;
            border-radius: 0.75em;
            cursor: pointer;
            transition: all 0.3s ease;
            min-width: 4em;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5em;
}

        .unit-pet-btn:hover {
            background: var(--glass-hover);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

        .unit-pet-btn.pet-allowed {
            background: rgba(34, 197, 94, 0.15);
            border-color: rgba(34, 197, 94, 0.4);
}

        .unit-pet-btn.pet-not-allowed {
            background: var(--glass-secondary);
            border-color: var(--glass-border);
            opacity: 0.7;
}

        .unit-pet-btn .pet-emoji {
            font-size: 1.5em;
}

        .unit-pet-btn .pet-status {
            font-size: 1.2em;
            font-weight: 600;
}

        .unit-delete-btn {
            background: var(--glass-primary);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            color: #ef4444;
            padding: 0.5em;
            border-radius: 0.5em;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.5em;
            height: 2.5em;
}

        .unit-delete-btn:hover {
            background: rgba(239, 68, 68, 0.1);
            border-color: rgba(239, 68, 68, 0.3);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

        .unit-grid {
            display: grid;
            gap: 0.875em;
            max-width: 100%;
            font-size: 1em;
}
        /* Default: if only 1 unit, full width. If 2+ units, max 2 columns */
        .unit-grid:has(:only-child) {
            grid-template-columns: 1fr;
}
        .unit-grid:has(:nth-child(2)) {
            grid-template-columns: repeat(2, 1fr);
}
        /* Editable floor label styling */
        .floor-label {
            transition: all 0.2s ease;
            padding: 2px 6px;
            border-radius: 4px;
}
        .floor-label:hover {
            background-color: #e5e7eb;
            box-shadow: 0 0 0 2px #3b82f6;
}
        /* On mobile, always stack vertically */
        @media (max-width: 767px) {
            .unit-grid {
                grid-template-columns: 1fr;
}
}

        /* Mobile Responsive Styles for Property Cards */
        @media (max-width: 768px) {
            .property-item-card {
                padding: 1rem 0.875rem;
                border-radius: 24px;
                min-height: 100px;
}
}

        @media (max-width: 480px) {
            .property-item-card {
                padding: 1rem 0.75rem;
                min-height: 105px;
}
}
        .unit-card {
            transition: all 0.3s ease;
}
        .unit-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
        .floor-section {
            transition: all 0.3s ease;
}
        .success-notification {
            animation: slideIn 0.3s ease;
}
        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
}
            to {
                transform: translateX(0);
                opacity: 1;
}
}
        .loader {
            border: 3px solid #f3f3f3;
            border-top: 3px solid #3498db;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
}
        @keyframes spin {
            0% { transform: rotate(0deg);
}
            100% { transform: rotate(360deg);
}
}

        /* Custom Grid Layout - Using Tailwind grid utilities in HTML instead */
        /* Removed iOS layout classes - now using Radix UI + Tailwind */

        /* Tab Styles - Now using .property-tab-btn.active with glass morphism */

        .tab-content {
            animation: fadeIn 0.3s ease-in-out;
}

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px);
}
            to { opacity: 1; transform: translateY(0);
}
}

        /* Responsive Two-Column Layout */
        .property-layout-grid {
            display: grid;
            grid-template-columns: 1.5rem minmax(0, 25fr) minmax(0, 75fr) 1.5rem;
            grid-template-rows: 1.5rem auto 1.5rem;
            gap: 0.75rem;
            position: relative;
            overflow-x: hidden;
            max-width: 100vw;
            box-sizing: border-box;
}

        .property-sidebar {
            position: relative;
            z-index: 10;
            grid-column: 2;
            grid-row: 2;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            max-height: calc(100vh - 3rem);
            /* Removed overflow-y: auto - only property list should scroll */
            overflow: visible;

            /* Glass styling - calculated border radius (property-list 43px + padding 24px = 67px) */
            background: rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 67px;
            box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
}

        /* UX Psychology Optimized Spacing */
        .property-sidebar .space-y-6 {
            display: flex;
            flex-direction: column;
            gap: 0.75em;
            /* Removed flex: 1 to prevent vertical stretching */
            min-height: 0;
}

        .property-sidebar .space-y-6 > * + * {
            margin-top: 0;
}

        /* Property List Container */
        .property-sidebar .property-list-container {
            /* Removed flex: 1 to prevent stretching - use max-height instead */
            display: flex;
            flex-direction: column;
            /* Calculate max height: viewport - top padding - action bar (~4rem) - statistics card (~10rem) - bottom padding */
            max-height: calc(100vh - 20rem);
            min-height: 300px;
            overflow-y: auto;
            /* Ensure scrolling behavior */
            overflow-x: hidden;

            /* Glass styling with calculated border radius */
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            /* Top corners: 43px (inner 27px + padding 16px), Bottom corners: 12px (match statistics card) */
            border-radius: 43px 43px 12px 12px;
            padding: 1rem;
}

        /* Thin scrollbar inside container */
        .property-sidebar .property-list-container::-webkit-scrollbar {
            width: 4px;
}

        .property-sidebar .property-list-container::-webkit-scrollbar-track {
            background: transparent;
            border-radius: 43px;
}

        .property-sidebar .property-list-container::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 2px;
            transition: background 0.2s ease;
}

        .property-sidebar .property-list-container::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.35);
}

        /* Firefox scrollbar styling */
        .property-sidebar .property-list-container {
            scrollbar-width: thin;
            scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

        /* ===================================================================
           SIDEBAR ACTION BAR - Menu, New Property, Close Buttons
           =================================================================== */

        .sidebar-action-bar {
            display: flex;
            gap: 0.75rem;
            align-items: center;
            width: 100%;
}

        /* Menu Button - Hidden on desktop, visible on tablet/mobile */
        .sidebar-menu-btn {
            display: none; /* Hidden by default on desktop */
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.25rem;
            padding: 0.625rem 0.75rem;
            background: rgba(0, 0, 0, var(--glass-opacity));
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 0.5px solid rgba(255, 255, 255, 0.1);
            /* Top-left: 43px (parent 67px - padding 24px), other corners: 10px */
            border-radius: 43px 10px 10px 10px;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
            min-width: 68px;
            min-height: 48px;
}

        .sidebar-menu-btn svg {
            width: 20px;
            height: 20px;
            color: rgba(255, 255, 255, 0.9);
}

        .sidebar-menu-text {
            font-size: 0.875em;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.85);
}

        [data-theme="light"] .sidebar-menu-text {
            color: rgba(255, 255, 255, 0.85);
}

        .sidebar-menu-btn:hover {
            background: rgba(0, 0, 0, var(--glass-opacity));
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

        .sidebar-menu-btn:active {
            transform: translateY(0);
}

        /* New Property Button (50% width - flex grow) */
        .sidebar-new-property-btn {
            flex: 1;
            /* Multi-layered gradient with noise texture */
            background:
                /* Noise overlay */
                repeating-linear-gradient(
                    45deg,
                    rgba(255, 255, 255, 0.03) 0px,
                    rgba(255, 255, 255, 0.03) 2px,
                    transparent 2px,
                    transparent 4px
                ),
                /* Top shine layer */
                linear-gradient(
                    to bottom,
                    rgba(255, 255, 255, 0.15) 0%,
                    transparent 50%
                ),
                /* Main gradient */
                linear-gradient(
                    135deg,
                    #ff7849 0%,
                    #ff6b35 25%,
                    #ff5722 50%,
                    #f4511e 75%,
                    #e64a19 100%
                );
            color: white;
            padding: 0.375rem 0.625rem;
            /* Top corners: 43px (parent 67px - padding 24px), Bottom corners: 8px */
            border-radius: 43px 43px 8px 8px;
            border: none;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.75rem;
            transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3),
                        inset 0 1px 0 rgba(255, 255, 255, 0.2);
            min-height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
}

        .sidebar-new-property-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background:
                /* Grain texture */
                repeating-radial-gradient(
                    circle at 20% 30%,
                    rgba(255, 255, 255, 0.04) 0px,
                    transparent 2px,
                    transparent 3px
                ),
                repeating-radial-gradient(
                    circle at 80% 70%,
                    rgba(0, 0, 0, 0.03) 0px,
                    transparent 2px,
                    transparent 3px
                );
            pointer-events: none;
}

        .sidebar-new-property-btn:hover {
            /* Enhanced multi-layered gradient on hover */
            background:
                /* Noise overlay */
                repeating-linear-gradient(
                    45deg,
                    rgba(255, 255, 255, 0.05) 0px,
                    rgba(255, 255, 255, 0.05) 2px,
                    transparent 2px,
                    transparent 4px
                ),
                /* Top shine layer - brighter */
                linear-gradient(
                    to bottom,
                    rgba(255, 255, 255, 0.25) 0%,
                    transparent 50%
                ),
                /* Main gradient - shifted */
                linear-gradient(
                    135deg,
                    #ff8a5b 0%,
                    #ff7849 25%,
                    #ff6b35 50%,
                    #ff5722 75%,
                    #f4511e 100%
                );
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4),
                        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

        .sidebar-new-property-btn:active {
            transform: translateY(0);
}

        /* Compact Close Button - Hidden on desktop, visible on mobile/tablet */
        .sidebar-close-btn-compact {
            display: none; /* Hidden by default on desktop */
            align-items: center;
            justify-content: center;
            width: 48px;
            height: 48px;
            min-width: 48px;
            min-height: 48px;
            background: rgba(239, 68, 68, var(--glass-opacity));
            border: 0.5px solid rgba(239, 68, 68, 0.2);
            /* Top-right: 43px (parent 67px - padding 24px), other corners: 10px */
            border-radius: 10px 43px 10px 10px;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            flex-shrink: 0;
}

        .sidebar-close-btn-compact svg {
            color: #dc2626;
}

        .sidebar-close-btn-compact:hover {
            background: rgba(239, 68, 68, var(--glass-opacity));
            border-color: rgba(239, 68, 68, 0.3);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

        .sidebar-close-btn-compact:active {
            transform: translateY(0);
}

        /* ===================================================================
           STATISTICS CARD - COLLAPSIBLE UX DESIGN
           ===================================================================

           Psychological Principles Applied:
           1. Progressive Disclosure: Reduces cognitive load by hiding details
           2. User Control: Empowers users with collapse/expand preference
           3. Visual Hierarchy: Key metrics always visible (Immobilien, Belegung)
           4. Consistency: State persists via localStorage (behavioral consistency)
           5. Feedback: Smooth animations provide clear interaction feedback

           Accessibility: WCAG AAA compliant with ARIA, keyboard support, focus management
        */

        .property-sidebar .glass:last-child {
            padding: 1rem;
            /* Glass-style sunset orange gradient border */
            border: 2px solid transparent;
            background:
                /* Main glass background */
                linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)),
                /* Sunset orange gradient border */
                linear-gradient(135deg,
                    rgba(255, 120, 73, 0.4),
                    rgba(255, 107, 53, 0.5),
                    rgba(255, 87, 34, 0.6),
                    rgba(255, 107, 53, 0.5),
                    rgba(255, 120, 73, 0.4)
                );
            background-origin: padding-box, border-box;
            background-clip: padding-box, border-box;
            /* Top corners: 12px, Bottom corners: 43px (parent 67px - sidebar padding 24px) */
            border-radius: 12px 12px 43px 43px;
            /* Glowing sunset shadow */
            box-shadow:
                inset 0 1px 0px rgba(255, 255, 255, 0.3),
                0 8px 24px rgba(255, 107, 53, 0.15),
                0 4px 12px rgba(255, 87, 34, 0.1),
                0 0 40px rgba(255, 120, 73, 0.08);
            /* Prevent shrinking in flex layout */
            flex-shrink: 0;
            /* Add significant spacing above statistics card for strong visual separation */
            margin-top: 8em;
            /* Transition for smooth collapse/expand */
            transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
}

        /* Statistics Card Header - Clickable Toggle */
        .statistics-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            user-select: none;
            padding: 0.5rem 0;
            margin-bottom: 0.75rem;
            transition: all 0.2s ease;
            border-radius: 6px;
}

        .statistics-header:hover {
            opacity: 0.8;
}

        .statistics-header:active {
            transform: scale(0.98);
}

        /* Focus visible for keyboard navigation (WCAG AAA) */
        .statistics-header:focus-visible {
            outline: 2px solid #2563eb;
            outline-offset: 2px;
            border-radius: 6px;
}

        .statistics-header h3 {
            display: flex;
            align-items: center;
            color: inherit;
            font-weight: 700;
            letter-spacing: -0.02em;
            font-size: 1rem;
            margin: 0;
            line-height: 1;
            gap: 0.5rem;
}

        .statistics-header h3 svg {
            display: block;
            color: inherit;
            stroke: currentColor;
            stroke-width: 2.5;
            flex-shrink: 0;
            margin-right: 0.5rem;
            vertical-align: baseline;
}

        /* Chevron Toggle Icon */
        .statistics-toggle-icon {
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            color: inherit;
            stroke: currentColor;
            width: 20px;
            height: 20px;
            flex-shrink: 0;
}

        .statistics-header[aria-expanded="false"] .statistics-toggle-icon {
            transform: rotate(-90deg);
}

        .statistics-header[aria-expanded="true"] .statistics-toggle-icon {
            transform: rotate(0deg);
}

        /* Compact Summary - Always Visible (Key Metrics) */
        .statistics-summary {
            display: flex;
            gap: 1.25rem;
            align-items: center;
            font-size: 0.875rem;
            color: inherit;
            margin-bottom: 0.5rem;
            flex-wrap: wrap;
}

        .statistics-summary-item {
            display: flex;
            flex-direction: column;
            gap: 0.125rem;
}

        .statistics-summary-label {
            font-size: 0.75rem;
            color: inherit;
            opacity: 0.8;
            font-weight: 500;
}

        .statistics-summary-value {
            font-weight: 700;
            color: inherit;
            font-size: 0.875rem;
}

        /* Belegungsrate Badge with Color Psychology */
        .occupancy-badge {
            padding: 0.25rem 0.5rem;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 700;
            display: inline-block;
}

        .occupancy-badge.high {
            background: rgba(34, 197, 94, 0.15);
            color: #15803d;
}

        .occupancy-badge.medium {
            background: rgba(251, 191, 36, 0.15);
            color: #b45309;
}

        .occupancy-badge.low {
            background: rgba(239, 68, 68, 0.15);
            color: #b91c1c;
}

        /* Statistics Details - Collapsible Content */
        .statistics-details {
            overflow: hidden;
            transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

        .statistics-details[aria-hidden="true"] {
            max-height: 0;
            opacity: 0;
            pointer-events: none;
}

        .statistics-details[aria-hidden="false"] {
            max-height: 500px;
            opacity: 1;
}

        /* Statistics Card Content Styling */
        .property-sidebar .glass:last-child #statistics {
            color: inherit;
            opacity: 0.9;
}

        .property-sidebar .glass:last-child #statistics .font-semibold {
            color: inherit;
            opacity: 1;
}

        /* Collapsed State - Minimal Height */
        .property-sidebar .glass:last-child.collapsed {
            padding: 0.875rem 1rem;
}

        /* Header Elements - Better Visual Hierarchy */
        .property-sidebar h2 {
            font-size: 1.125rem;
            font-weight: 600;
            letter-spacing: -0.01em;
}

        .property-sidebar h3 {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 1rem;
}

        .property-main-content {
            position: relative;
            min-height: 400px;
            grid-column: 3;
            grid-row: 2;
}

        /* Mobile Sidebar Overlay */
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, var(--glass-opacity));
            z-index: 999;
            
            transition: opacity 0.3s ease;
}

        /* Tablet and Mobile Responsive Styles */
        @media (max-width: 1024px) {
            /* Show menu button on tablet/mobile where sidebar is collapsible */
            .sidebar-menu-btn {
                display: flex;
}
}

        /* Mobile Responsive Styles */
        @media (max-width: 768px) {
            .property-layout-grid {
                grid-template-columns: 1rem 1fr 1rem;
                grid-template-rows: 1rem auto 1rem;
                gap: 0;
}

            .property-sidebar {
                grid-column: 2;
                grid-row: 2;
}

            .property-main-content {
                grid-column: 2;
                grid-row: 2;
}

            .property-sidebar {
                position: fixed;
                top: 0;
                left: 0;
                bottom: 0;
                width: 85%;
                max-width: 320px;
                background: rgba(255, 255, 255, 0.98);
                backdrop-filter: blur(20px);
                -webkit-backdrop-filter: blur(20px);
                transform: translateX(-100%);
                transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
                z-index: 1000;
                overflow-y: auto;
                padding: 0.875rem;
                box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

            /* Mobile Spacing Adjustments */
            .property-sidebar .space-y-6 {
                gap: 1.125rem;
}

            .property-sidebar .property-list-container #propertyList {
                padding: 0;
}

            .property-sidebar .property-list-container > div:first-child {
                padding: 0;
}

            /* Mobile Statistics Card Adjustments */
            .property-sidebar .glass:last-child {
                padding: 0.875rem;
                border-width: 1.5px;
}

            .property-sidebar .glass:last-child.collapsed {
                padding: 0.75rem;
}

            .statistics-summary {
                gap: 0.875rem;
}

            .statistics-summary-item {
                min-width: 70px;
}

            .property-item-card {
                padding: 1rem 0.875rem;
                margin-bottom: 0.75rem;
                min-height: 100px;
}

            .property-sidebar > div > button:first-child {
                margin-bottom: 1.125rem;
}

            .property-sidebar.active {
                transform: translateX(0);
}

            .sidebar-overlay {
                display: block;
}

            .property-main-content {
                padding-top: 1rem;
}

            /* Add padding to account for toggle button */
            .property-main-content > :first-child {
                margin-top: 3.5rem;
}
}

        /* Tablet Responsive */
        /* Tablet Responsive Styles */
        @media (min-width: 769px) and (max-width: 1024px) {
            .property-layout-grid {
                grid-template-columns: 0.75rem 1fr 0.75rem;
                grid-template-rows: 0.75rem auto 0.75rem;
}

            /* Make sidebar overlay on tablet like mobile */
            .property-sidebar {
                position: fixed;
                top: 0;
                left: 0;
                bottom: 0;
                width: 45%;
                max-width: 400px;
                background: rgba(255, 255, 255, 0.98);
                backdrop-filter: blur(20px);
                -webkit-backdrop-filter: blur(20px);
                transform: translateX(-100%);
                transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
                z-index: 1000;
                overflow-y: auto;
                padding: 1.125rem;
                box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

            .property-sidebar.active {
                transform: translateX(0);
}

            .sidebar-overlay {
                display: block;
}

            .property-main-content {
                grid-column: 2;
                grid-row: 2;
}

            .property-sidebar .space-y-6 {
                gap: 1.25rem;
}

            .property-sidebar .property-list-container #propertyList {
                padding: 0;
}

            .property-sidebar .property-list-container > div:first-child {
                padding: 0;
}

            /* Tablet Statistics Card Adjustments */
            .property-sidebar .glass:last-child {
                padding: 1rem;
}

            .property-sidebar .glass:last-child.collapsed {
                padding: 0.875rem;
}

            .statistics-summary {
                gap: 1rem;
}

            .property-item-card {
                padding: 1.125rem 1rem;
                margin-bottom: 0.8125rem;
                min-height: 105px;
}
}

        /* Close button in sidebar - Always visible when sidebar is open */
        .sidebar-close-btn {
            position: absolute;
            top: 0.875rem;
            right: 0.875rem;
            background: rgba(239, 68, 68, var(--glass-opacity));
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 10px;
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            z-index: 10;
}

        .sidebar-close-btn:hover {
            background: rgba(239, 68, 68, var(--glass-opacity));
            transform: scale(1.05);
}

        .sidebar-close-btn:active {
            transform: scale(0.95);
}

        /* Desktop: Hide close button since sidebar is part of grid layout */
        @media (min-width: 769px) {
            .sidebar-close-btn {
                display: none;
}
}

        /* Mobile: Show close button for collapsible sidebar */
        @media (max-width: 768px) {
            .sidebar-close-btn {
                display: flex;
}
}

        /* ===================================================================
           PHASE 1-3: COMPREHENSIVE SPACING & LAYOUT IMPROVEMENTS
           Based on UX Psychology Principles for Optimal Form Completion
           =================================================================== */

        /* PHASE 1: CRITICAL FIXES - Glass Container & Form Field Spacing */

        /* Glass Container Improvements - Desktop */
        .property-main-content .glass.rounded-xl {
            padding: 2rem;
            margin-bottom: 2rem;
            border-radius: 27px;
}

        /* Section Headers - Better Visual Hierarchy */
        .property-main-content .glass h3 {
            font-size: 1.125rem;
            font-weight: 600;
            line-height: 1.4;
            margin-bottom: 1.5rem;
            letter-spacing: -0.01em;
            color: #1f2937;
}

        /* Form Field Spacing - CRITICAL FIX */
        .property-main-content .space-y-3 > * + *,
        .property-main-content .space-y-4 > * + * {
            margin-top: 1.5rem;
}

        /* Label to Input Spacing */
        .property-main-content label {
            display: block;
            font-size: 0.875rem;
            font-weight: 500;
            color: #374151;
            margin-bottom: 0.5rem;
            line-height: 1.5;
            letter-spacing: 0.01em;
}

        /* Input Field Dimensions - WCAG AAA Compliant */
        .property-main-content input[type="text"],
        .property-main-content input[type="email"],
        .property-main-content input[type="number"],
        .property-main-content input[type="tel"],
        .property-main-content input[type="date"],
        .property-main-content select,
        .property-main-content textarea {
            width: 100%;
            padding: 0.5em 0.875em;
            font-size: 0.9375rem;
            line-height: 1.5;
            color: #1f2937;
            /* Glass morphism styling */
            background: rgba(255, 255, 255, 0.6);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.5);
            border-radius: 0.75em;
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.8),
                0 2px 4px rgba(0, 0, 0, 0.04);
            transition: all 0.2s ease;
            min-height: 40px;
}

        /* Focus States - Glass with sunset glow */
        .property-main-content input:focus,
        .property-main-content select:focus,
        .property-main-content textarea:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.75);
            border-color: #f97316;
            box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

        /* Textarea Specific */
        .property-main-content textarea {
            min-height: 96px;
            resize: vertical;
}

        /* Unit Card Spacing - COMPACT VERSION */
        .unit-card-glass {
            padding: 0.5rem;
            margin-bottom: 0.5rem;
}

        /* Unit Header Section */
        .unit-card-glass .flex.justify-between.items-start {
            margin-bottom: 0.25rem;
            padding-bottom: 0;
            border-bottom: none;
}

        /* Unit Heading */
        .unit-card-glass h3 {
            font-size: 0.875em;
            font-weight: 600;
            line-height: 1.3;
            margin-bottom: 0;
            color: inherit;
}

        /* Unit Card Inputs - Override general input styles
         * Using attribute selectors (0,2,1) to beat .property-main-content input (0,1,1) */
        .unit-card-glass input[type="text"],
        .unit-card-glass input[type="email"],
        .unit-card-glass input[type="number"],
        .unit-card-glass input[type="tel"] {
            padding: 0.25em 0.5em;
            font-size: 0.875em;
            min-height: auto;
}

        /* Unit Card Labels - .unit-card-glass label (0,1,1) beats .property-main-content label (0,1,1)
         * when declared later in cascade, which it is */
        .unit-card-glass label {
            font-size: 0.75em;
            margin-bottom: 0.125em;
}

        /* Unit Card Spacing Utilities - using .unit-card-glass combined for 0,2,0 */
        .unit-card-glass .space-y-1 > * + * {
            margin-top: 0.25rem;
}

        .unit-card-glass .mb-1 {
            margin-bottom: 0.25rem;
}

        .unit-card-glass .mb-1\.5 {
            margin-bottom: 0.375rem;
}

        .unit-card-glass .gap-1 {
            gap: 0.25rem;
}

        /* Unit Card Grid */
        .unit-card-glass .grid {
            gap: 0.25rem;
}

        /* Force 3-column grid for Zimmer/Bewohner/Schlüssel
         * .unit-card-glass .grid.grid-cols-3 = specificity 0,3,0 */
        .unit-card-glass .grid.grid-cols-3 {
            grid-template-columns: repeat(3, 1fr);
}

        /* Unit Card Buttons - .unit-card-glass button (0,1,1) beats .property-main-content button (0,1,1)
         * when declared later in cascade */
        .unit-card-glass button,
        .unit-card-glass .notes-btn {
            padding: 0.25em 0.5em;
            font-size: 0.875em;
            min-height: auto;
}

        /* Unit Card Status Badges */
        .unit-card-glass span.text-xs {
            font-size: 0.75em;
            padding: 0.125em 0.375em;
}

        /* PHASE 2: VISUAL HIERARCHY - Field Groups & Separation */

        /* Grid Layout Improvements */
        .property-main-content .grid.grid-cols-2 {
            gap: 1.5rem 1.25rem;
}

        /* Floor Section Spacing */
        .floor-section-glass {
            padding: 1.5rem;
            margin-bottom: 1.5rem;
}

        .floor-section-glass .flex.justify-between.items-center {
            margin-bottom: 1.25rem;
}

        /* Button Improvements - Touch Target Optimization */
        .property-main-content button,
        .property-main-content .button {
            min-height: 2.75em;
            padding: 0.75em 1.25em;
            font-size: 1em;
            font-weight: 500;
            line-height: 1.5;
            border-radius: 0.5rem;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
}

        /* Button Groups */
        .property-main-content .flex.gap-2 {
            gap: 0.75rem;
}

        /* PHASE 3: PHOTO GALLERY & MODAL IMPROVEMENTS */

        /* Photo Gallery Grid - ID selector gives 1,0,0 specificity */
        #buildingPhotosGallery {
            padding: 0;
            background-color: #f9fafb;
            border-radius: 0.5rem;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(var(--photo-grid-min-size, 140px), 1fr));
            gap: 1rem;
            height: 100%;
            max-height: 100%;
            margin: 0 0 -2px 0;
}

        #buildingPhotosGallery > div {
            width: 100%;
            height: auto;
            border-radius: 0.5rem;
            overflow: hidden;
            position: relative;
            background: #ffffff;
            border: 1px solid #e5e7eb;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            transition: all 0.2s ease;
}

        #buildingPhotosGallery > div:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

        /* Photo Modal Backdrop */
        .photo-modal-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 9998;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1.5rem;
            animation: fadeIn 0.2s ease;
}

        /* Photo Modal Container */
        .photo-modal {
            position: relative;
            max-width: 90vw;
            max-height: 90vh;
            background: #ffffff;
            border-radius: 1rem;
            padding: 1.5rem;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
            z-index: 9999;
            animation: scaleIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

        .photo-modal img {
            width: 100%;
            height: auto;
            max-height: calc(90vh - 6rem);
            object-fit: contain;
            border-radius: 0.5rem;
}

        /* Photo Modal Close Button */
        .photo-modal-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
            background: rgba(239, 68, 68, 0.9);
            color: #ffffff;
            border: none;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            z-index: 10000;
}

        .photo-modal-close:hover {
            background: rgba(220, 38, 38, 1);
            transform: scale(1.1);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

        /* Modal Animations */
        @keyframes fadeIn {
            from { opacity: 0;
}
            to { opacity: 1;
}
}

        @keyframes scaleIn {
            from {
                opacity: 0;
                transform: scale(0.9);
}
            to {
                opacity: 1;
                transform: scale(1);
}
}

        /* Notes Dropdown Improvements */
        .notes-content {
            min-width: 320px;
            max-width: 480px;
            margin-top: 0.5rem;
            padding: 1.25rem;
            border-radius: 0.75rem;
            box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
}

        .notes-content > div:first-child {
            margin-bottom: 0.75rem;
}

        .notes-text {
            line-height: 1.6;
            margin-bottom: 1rem;
            padding: 0.75rem;
            background: #f9fafb;
            border-radius: 0.5rem;
}

        .notes-content textarea {
            margin-top: 1rem;
            min-height: 120px;
}

        /* Tab Content Spacing */
        .property-main-content > div > * + * {
            margin-top: 2rem;
}

        /* Property Main Content Padding */
        .property-main-content {
            padding: 2rem 3rem 2rem 2rem;
}

        /* ===================================================================
           TABLET RESPONSIVE ADJUSTMENTS (769px - 1024px)
           =================================================================== */

        @media (min-width: 769px) and (max-width: 1024px) {
            .property-main-content .glass.rounded-xl {
                padding: 1.5rem;
                margin-bottom: 1.5rem;
                border-radius: 27px;
}

            .property-main-content .glass h3 {
                font-size: 1rem;
                margin-bottom: 1.25rem;
}

            .property-main-content .space-y-3 > * + *,
            .property-main-content .space-y-4 > * + * {
                margin-top: 1.25rem;
}

            .property-main-content input,
            .property-main-content select,
            .property-main-content textarea {
                padding: 0.6875rem 0.875rem;
                font-size: 0.875rem;
}

            .unit-card-glass {
                padding: 0.5rem;
}

            .floor-section-glass {
                padding: 1.25rem;
}

            .property-main-content .grid.grid-cols-2 {
                gap: 1.25rem 1rem;
}

            .property-main-content {
                padding: 1.25rem 2rem 1.25rem 1.25rem;
}

            #buildingPhotosGallery {
                grid-template-columns: repeat(auto-fill, minmax(var(--photo-grid-min-size, 120px), 1fr));
                gap: 0.875rem;
                padding: 1em;
                height: 100%;
                max-height: 100%;
                margin: 0 0 -2px 0;
}

            /* Statistics Card - Tablet */
            .property-sidebar .glass:last-child {
                border-width: 1.5px;
                padding: 1.25rem;
}

            /* Action Bar - Tablet */
            .sidebar-menu-btn {
                display: flex; /* Show menu button on tablet where sidebar is collapsible */
                min-width: 60px;
                padding: 0.5rem 0.625rem;
}

            .sidebar-menu-text {
                font-size: 0.6875rem;
}

            .sidebar-new-property-btn {
                font-size: 0.6875rem;
                padding: 0.375rem 0.5rem;
                min-height: 38px;
}

            .sidebar-close-btn-compact {
                display: flex; /* Show close button on tablet */
                width: 44px;
                height: 44px;
                min-width: 44px;
                min-height: 44px;
}
}

        /* ===================================================================
           MOBILE RESPONSIVE ADJUSTMENTS (<768px)
           =================================================================== */

        @media (max-width: 768px) {
            .property-main-content .glass.rounded-xl {
                padding: 1.25rem;
                margin-bottom: 1.25rem;
                border-radius: 24px;
}

            .property-main-content .glass h3 {
                font-size: 1rem;
                margin-bottom: 1.25rem;
}

            .property-main-content .space-y-3 > * + *,
            .property-main-content .space-y-4 > * + * {
                margin-top: 1.125rem;
}

            .property-main-content label {
                font-size: 0.8125rem;
                margin-bottom: 0.375rem;
}

            .property-main-content input,
            .property-main-content select,
            .property-main-content textarea {
                padding: 0.75rem 0.875rem;
                font-size: 1rem;
                min-height: 48px;
}

            .property-main-content button {
                min-height: 48px;
                padding: 0.875rem 1.125rem;
                font-size: 1rem;
}

            .unit-card-glass {
                padding: 0.5rem;
}

            .floor-section-glass {
                padding: 1rem;
}

            /* Force single column grids on mobile */
            .property-main-content .grid.grid-cols-2 {
                grid-template-columns: 1fr;
                gap: 1.125rem;
}

            /* Stack buttons vertically */
            .property-main-content .flex.gap-2 {
                flex-direction: column;
                gap: 0.75rem;
}

            .property-main-content .flex.gap-2 button {
                width: 100%;
}

            .property-main-content {
                padding: 1rem 1.5rem 1rem 1rem;
}

            #buildingPhotosGallery {
                grid-template-columns: repeat(auto-fill, minmax(var(--photo-grid-min-size, 100px), 1fr));
                gap: 0.75rem;
                padding: 1em;
                height: 100%;
                max-height: 100%;
                margin: 0 0 -2px 0;
}

            /* Photo Modal Mobile */
            .photo-modal-backdrop {
                padding: 1rem;
}

            .photo-modal {
                padding: 1rem;
                max-width: 95vw;
                max-height: 95vh;
}

            .photo-modal img {
                max-height: calc(95vh - 4rem);
}

            .photo-modal-close {
                top: 0.5rem;
                right: 0.5rem;
                width: 48px;
                height: 48px;
}

            /* Notes Dropdown Mobile */
            .notes-content {
                min-width: 280px;
                max-width: calc(100vw - 2rem);
                padding: 1rem;
}

            /* Statistics Card - Mobile */
            .property-sidebar .glass:last-child {
                border-width: 1.5px;
                padding: 1.125rem;
}

            /* Action Bar - Mobile */
            .sidebar-action-bar {
                gap: 0.375rem;
}

            .sidebar-menu-btn {
                display: flex; /* Show menu button on mobile where sidebar is collapsible */
                min-width: 56px;
                padding: 0.5rem;
}

            .sidebar-menu-text {
                font-size: 0.625rem;
}

            .sidebar-new-property-btn {
                font-size: 0.625rem;
                padding: 0.375rem 0.5rem;
                min-height: 38px;
}

            .sidebar-close-btn-compact {
                display: flex; /* Show close button on mobile */
                width: 44px;
                height: 44px;
                min-width: 44px;
                min-height: 44px;
}
}

        /* ===================================================================
           DARK THEME SUPPORT
           =================================================================== */

        /* Dark Theme - Statistics Card Border */
        body[data-theme="dark"] .property-sidebar .glass:last-child,
        body.theme-dark .property-sidebar .glass:last-child {
            /* Glass-style sunset orange gradient border for dark theme */
            border: 2px solid transparent;
            background:
                /* Main glass background */
                linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
                /* Sunset orange gradient border */
                linear-gradient(135deg,
                    rgba(255, 120, 73, 0.5),
                    rgba(255, 107, 53, 0.6),
                    rgba(255, 87, 34, 0.7),
                    rgba(255, 107, 53, 0.6),
                    rgba(255, 120, 73, 0.5)
                );
            background-origin: padding-box, border-box;
            background-clip: padding-box, border-box;
}

        /* Dark Theme - Statistics Header */
        body[data-theme="dark"] .statistics-header h3,
        body.theme-dark .statistics-header h3,
        body[data-theme="dark"] .statistics-toggle-icon,
        body.theme-dark .statistics-toggle-icon {
            color: rgba(245, 241, 232, 0.95);
}

        /* Dark Theme - Statistics Summary */
        body[data-theme="dark"] .statistics-summary,
        body.theme-dark .statistics-summary {
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .statistics-summary-label,
        body.theme-dark .statistics-summary-label {
            color: rgba(255, 255, 255, 0.6);
}

        body[data-theme="dark"] .statistics-summary-value,
        body.theme-dark .statistics-summary-value {
            color: rgba(245, 241, 232, 0.95);
}

        /* Light Theme - Statistics Card */
        body[data-theme="light"] .property-sidebar .glass:last-child,
        body.theme-light .property-sidebar .glass:last-child {
            color: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .statistics-header h3,
        body.theme-light .statistics-header h3,
        body[data-theme="light"] .statistics-toggle-icon,
        body.theme-light .statistics-toggle-icon {
            color: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .statistics-summary,
        body.theme-light .statistics-summary {
            color: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .statistics-summary-label,
        body.theme-light .statistics-summary-label {
            color: rgba(44, 62, 80, 0.7);
}

        body[data-theme="light"] .statistics-summary-value,
        body.theme-light .statistics-summary-value {
            color: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .property-sidebar .glass:last-child #statistics,
        body.theme-light .property-sidebar .glass:last-child #statistics {
            color: rgba(44, 62, 80, 0.85);
}

        body[data-theme="light"] .property-sidebar .glass:last-child #statistics .font-semibold,
        body.theme-light .property-sidebar .glass:last-child #statistics .font-semibold {
            color: rgba(44, 62, 80, 0.95);
}

        /* Dark Theme - Occupancy Badges */
        body[data-theme="dark"] .occupancy-badge.high,
        body.theme-dark .occupancy-badge.high {
            background: rgba(34, 197, 94, 0.2);
            color: #86efac;
}

        body[data-theme="dark"] .occupancy-badge.medium,
        body.theme-dark .occupancy-badge.medium {
            background: rgba(251, 191, 36, 0.2);
            color: #fcd34d;
}

        body[data-theme="dark"] .occupancy-badge.low,
        body.theme-dark .occupancy-badge.low {
            background: rgba(239, 68, 68, 0.2);
            color: #fca5a5;
}

        /* Dark Theme - Focus Visible */
        body[data-theme="dark"] .statistics-header:focus-visible,
        body.theme-dark .statistics-header:focus-visible {
            outline-color: #60a5fa;
}

        body[data-theme="dark"] .property-sidebar .glass:last-child,
        body.theme-dark .property-sidebar .glass:last-child {
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .property-sidebar .glass:last-child h3,
        body.theme-dark .property-sidebar .glass:last-child h3 {
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .property-sidebar .glass:last-child #statistics,
        body.theme-dark .property-sidebar .glass:last-child #statistics {
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .property-sidebar .glass:last-child #statistics .font-semibold,
        body.theme-dark .property-sidebar .glass:last-child #statistics .font-semibold {
            color: rgba(245, 241, 232, 0.98);
}

        /* Dark Theme - Action Bar Buttons */
        body[data-theme="dark"] .sidebar-menu-btn,
        body.theme-dark .sidebar-menu-btn {
            background: rgba(0, 0, 0, var(--glass-opacity));
            border-color: rgba(255, 255, 255, 0.2);
}

        body[data-theme="dark"] .sidebar-menu-btn svg,
        body.theme-dark .sidebar-menu-btn svg,
        body[data-theme="dark"] .sidebar-menu-text,
        body.theme-dark .sidebar-menu-text {
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .sidebar-menu-btn:hover,
        body.theme-dark .sidebar-menu-btn:hover {
            background: rgba(0, 0, 0, var(--glass-opacity));
            border-color: rgba(255, 255, 255, 0.3);
}

        body[data-theme="dark"] .sidebar-close-btn-compact,
        body.theme-dark .sidebar-close-btn-compact {
            background: rgba(239, 68, 68, var(--glass-opacity));
            border-color: rgba(239, 68, 68, 0.3);
}

        body[data-theme="dark"] .sidebar-close-btn-compact:hover,
        body.theme-dark .sidebar-close-btn-compact:hover {
            background: rgba(239, 68, 68, var(--glass-opacity));
            border-color: rgba(239, 68, 68, 0.4);
}

        /* Light Theme - Property Editor Navigation */
        body[data-theme="light"] .property-tab-nav,
        body.theme-light .property-tab-nav {
            color: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .property-tab-btn,
        body.theme-light .property-tab-btn {
            color: rgba(44, 62, 80, 0.7);
}

        body[data-theme="light"] .property-tab-btn:hover,
        body.theme-light .property-tab-btn:hover {
            background: rgba(44, 62, 80, 0.08);
            color: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .property-tab-btn.active,
        body.theme-light .property-tab-btn.active {
            color: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .property-save-btn,
        body.theme-light .property-save-btn {
            color: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .property-delete-btn,
        body.theme-light .property-delete-btn {
            color: rgba(44, 62, 80, 0.95);
}

        /* Light Theme - Property Cards */
        body[data-theme="light"] .property-item-card,
        body.theme-light .property-item-card {
            color: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .property-item-card h4,
        body.theme-light .property-item-card h4,
        body[data-theme="light"] .property-item-card p,
        body.theme-light .property-item-card p,
        body[data-theme="light"] .property-item-card span,
        body.theme-light .property-item-card span {
            color: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .property-item-card svg,
        body.theme-light .property-item-card svg {
            color: rgba(44, 62, 80, 0.95);
            stroke: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .property-stat-item,
        body.theme-light .property-stat-item {
            color: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .property-stat-item .stat-label,
        body.theme-light .property-stat-item .stat-label {
            color: rgba(44, 62, 80, 0.7);
}

        /* Dark Theme - Property Editor Navigation */
        body[data-theme="dark"] .property-tab-nav,
        body.theme-dark .property-tab-nav {
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .property-tab-btn,
        body.theme-dark .property-tab-btn {
            color: rgba(245, 241, 232, 0.7);
}

        body[data-theme="dark"] .property-tab-btn:hover,
        body.theme-dark .property-tab-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .property-tab-btn.active,
        body.theme-dark .property-tab-btn.active {
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .property-save-btn,
        body.theme-dark .property-save-btn {
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .property-delete-btn,
        body.theme-dark .property-delete-btn {
            color: rgba(245, 241, 232, 0.95);
}

        /* Dark Theme - Property Cards */
        body[data-theme="dark"] .property-item-card,
        body.theme-dark .property-item-card {
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .property-item-card h4,
        body.theme-dark .property-item-card h4,
        body[data-theme="dark"] .property-item-card p,
        body.theme-dark .property-item-card p,
        body[data-theme="dark"] .property-item-card span,
        body.theme-dark .property-item-card span {
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .property-item-card svg,
        body.theme-dark .property-item-card svg {
            color: rgba(245, 241, 232, 0.95);
            stroke: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .property-stat-item,
        body.theme-dark .property-stat-item {
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .property-stat-item .stat-label,
        body.theme-dark .property-stat-item .stat-label {
            color: rgba(245, 241, 232, 0.8);
}

        /* Dark Theme - Main Content Area (Navbar, Headings, Text) */
        body[data-theme="dark"] .glass h3,
        body.theme-dark .glass h3,
        body[data-theme="dark"] .glass h4,
        body.theme-dark .glass h4,
        body[data-theme="dark"] .tab-btn,
        body.theme-dark .tab-btn {
            color: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .glass p,
        body.theme-dark .glass p,
        body[data-theme="dark"] .glass span,
        body.theme-dark .glass span,
        body[data-theme="dark"] .glass label,
        body.theme-dark .glass label {
            color: rgba(245, 241, 232, 0.85);
}

        body[data-theme="dark"] .glass svg,
        body.theme-dark .glass svg {
            color: rgba(245, 241, 232, 0.95);
            stroke: rgba(245, 241, 232, 0.95);
}

        body[data-theme="dark"] .glass input,
        body.theme-dark .glass input,
        body[data-theme="dark"] .glass textarea,
        body.theme-dark .glass textarea {
            color: rgba(245, 241, 232, 0.95);
            /* Dark glass morphism */
            background: rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.15);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                0 2px 4px rgba(0, 0, 0, 0.2);
}

        body[data-theme="dark"] .glass input:focus,
        body.theme-dark .glass input:focus,
        body[data-theme="dark"] .glass textarea:focus,
        body.theme-dark .glass textarea:focus {
            background: rgba(0, 0, 0, 0.4);
            border-color: #f97316;
            box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

        body[data-theme="dark"] .glass input::placeholder,
        body.theme-dark .glass input::placeholder,
        body[data-theme="dark"] .glass textarea::placeholder,
        body.theme-dark .glass textarea::placeholder {
            color: rgba(245, 241, 232, 0.5);
}

        /* Light Theme - Main Content Area (Navbar, Headings, Text) */
        body[data-theme="light"] .floor-section-glass,
        body.theme-light .floor-section-glass,
        body[data-theme="light"] .unit-card-glass,
        body.theme-light .unit-card-glass {
            color: rgba(44, 62, 80, 0.95);
}

        /* Light theme - Unit status modifiers */
        body[data-theme="light"] .unit-card-glass.unit-occupied,
        body.theme-light .unit-card-glass.unit-occupied {
            border: 2px solid rgba(34, 197, 94, 0.9);
            box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.8),
                        0 2px 4px rgba(0, 0, 0, 0.1),
                        0 0 0 1px rgba(34, 197, 94, 0.4);
}

        body[data-theme="light"] .unit-card-glass.unit-maintenance,
        body.theme-light .unit-card-glass.unit-maintenance {
            border: 2px solid rgba(234, 179, 8, 0.9);
            box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.8),
                        0 2px 4px rgba(0, 0, 0, 0.1),
                        0 0 0 1px rgba(234, 179, 8, 0.4);
}

        body[data-theme="light"] .glass h3,
        body.theme-light .glass h3,
        body[data-theme="light"] .glass h4,
        body.theme-light .glass h4,
        body[data-theme="light"] .floor-section-glass h3,
        body.theme-light .floor-section-glass h3,
        body[data-theme="light"] .floor-section-glass h4,
        body.theme-light .floor-section-glass h4,
        body[data-theme="light"] .unit-card-glass h3,
        body.theme-light .unit-card-glass h3 {
            color: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .glass p,
        body.theme-light .glass p,
        body[data-theme="light"] .glass span,
        body.theme-light .glass span,
        body[data-theme="light"] .glass label,
        body.theme-light .glass label,
        body[data-theme="light"] .floor-section-glass p,
        body.theme-light .floor-section-glass p,
        body[data-theme="light"] .floor-section-glass span,
        body.theme-light .floor-section-glass span,
        body[data-theme="light"] .floor-section-glass label,
        body.theme-light .floor-section-glass label,
        body[data-theme="light"] .unit-card-glass p,
        body.theme-light .unit-card-glass p,
        body[data-theme="light"] .unit-card-glass span,
        body.theme-light .unit-card-glass span,
        body[data-theme="light"] .unit-card-glass label,
        body.theme-light .unit-card-glass label {
            color: rgba(44, 62, 80, 0.85);
}

        body[data-theme="light"] .glass svg,
        body.theme-light .glass svg,
        body[data-theme="light"] .floor-section-glass svg,
        body.theme-light .floor-section-glass svg,
        body[data-theme="light"] .unit-card-glass svg,
        body.theme-light .unit-card-glass svg {
            color: rgba(44, 62, 80, 0.95);
            stroke: rgba(44, 62, 80, 0.95);
}

        body[data-theme="light"] .glass input,
        body.theme-light .glass input,
        body[data-theme="light"] .glass textarea,
        body.theme-light .glass textarea,
        body[data-theme="light"] .floor-section-glass input,
        body.theme-light .floor-section-glass input,
        body[data-theme="light"] .unit-card-glass input,
        body.theme-light .unit-card-glass input,
        body[data-theme="light"] .unit-card-glass textarea,
        body.theme-light .unit-card-glass textarea {
            color: rgba(44, 62, 80, 0.95);
            background: rgba(255, 255, 255, 0.5);
            border-color: rgba(44, 62, 80, 0.2);
}

        body[data-theme="light"] .glass input::placeholder,
        body.theme-light .glass input::placeholder,
        body[data-theme="light"] .glass textarea::placeholder,
        body.theme-light .glass textarea::placeholder,
        body[data-theme="light"] .unit-card-glass input::placeholder,
        body.theme-light .unit-card-glass input::placeholder,
        body[data-theme="light"] .unit-card-glass textarea::placeholder,
        body.theme-light .unit-card-glass textarea::placeholder {
            color: rgba(44, 62, 80, 0.5);
}

        /* ============================================
           ORIENTATION LOCK - Mobile/Tablet Portrait
           ============================================ */

        /* Orientation Lock Overlay - Hidden by default */
        .orientation-lock-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            z-index: 99999;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            text-align: center;
}

        /* Show overlay and hide content on mobile/tablet in portrait mode */
        @media (max-width: 1024px) and (orientation: portrait) {
            .orientation-lock-overlay {
                display: flex !important;
}

            .property-layout-grid,
            .property-sidebar,
            .property-main-content,
            .sidebar-overlay {
                display: none !important;
}
}

        /* Orientation Lock Content Styles */
        .orientation-lock-content {
            max-width: 400px;
            width: 100%;
}

        .orientation-lock-icon {
            width: 120px;
            height: 120px;
            margin: 0 auto 2rem;
            position: relative;
            animation: rotatePhonePulse 3s ease-in-out infinite;
}

        .orientation-lock-icon svg {
            width: 100%;
            height: 100%;
            filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

        @keyframes rotatePhonePulse {
            0%, 100% {
                transform: rotate(0deg) scale(1);
}
            25% {
                transform: rotate(-90deg) scale(1.1);
}
            50% {
                transform: rotate(-90deg) scale(1.1);
}
            75% {
                transform: rotate(0deg) scale(1);
}
}

        .orientation-lock-title {
            font-size: 1.75rem;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 1rem;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

        .orientation-lock-description {
            font-size: 1.125rem;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.6;
            margin-bottom: 2rem;
            text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

        .orientation-lock-instruction {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            padding: 1rem 2rem;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 12px;
            color: #ffffff;
            font-weight: 600;
            font-size: 1rem;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            animation: pulseGlow 2s ease-in-out infinite;
}

        @keyframes pulseGlow {
            0%, 100% {
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
                transform: scale(1);
}
            50% {
                box-shadow: 0 6px 25px rgba(255, 255, 255, 0.3);
                transform: scale(1.05);
}
}

        .orientation-lock-instruction svg {
            width: 24px;
            height: 24px;
            animation: rotate360 2s linear infinite;
}

        @keyframes rotate360 {
            from { transform: rotate(0deg);
}
            to { transform: rotate(360deg);
}
}

        /* Dark Theme Support for Orientation Lock */
        body[data-theme="dark"] .orientation-lock-overlay,
        body.theme-dark .orientation-lock-overlay {
            background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

        body[data-theme="dark"] .orientation-lock-title,
        body.theme-dark .orientation-lock-title {
            color: rgba(255, 255, 255, 0.98);
}

        body[data-theme="dark"] .orientation-lock-description,
        body.theme-dark .orientation-lock-description {
            color: rgba(255, 255, 255, 0.85);
}

        body[data-theme="dark"] .orientation-lock-instruction,
        body.theme-dark .orientation-lock-instruction {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.25);
}

        /* Accessibility - Reduce motion for users who prefer it */
        @media (prefers-reduced-motion: reduce) {
            .orientation-lock-icon,
            .orientation-lock-instruction,
            .orientation-lock-instruction svg {
                animation: none !important;
}
}

/* ============================================
   PROPERTY CARD COMPONENTS (JavaScript Templates)
   ============================================ */

/* Property Card Content Area */
.property-card-content {
    overflow: visible;
}

/* Property Card Title */
.property-card-title {
    margin-bottom: 0.375rem;
    line-height: 0.5;
}

/* Property Card Address */
.property-card-address {
    margin-bottom: 0.5rem;
    line-height: 1;
}

/* Property Stats Container */
.property-stats-container {
    padding-top: 0.125rem;
}

/* Stat Icon (SVG in property cards) */
.stat-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 0.125rem;
    vertical-align: -2px;
}

.stat-icon.bold {
    font-weight: bold;
}

/* Stat Value */
.stat-value {
    margin-right: 0.125rem;
}

/* Unit/Floor Collapse Toggle */
.collapse-toggle {
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
}

/* Add Unit Button (same as Add Floor)
 * Double-class selector for specificity 0,2,0 to override .property-main-content button */
.add-unit-btn.add-unit-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875em;
    min-height: auto;
    background: linear-gradient(135deg, #ff7849 0%, #ff6b35 25%, #ff5722 50%, #f4511e 75%, #e64a19 100%);
    color: white;
    border: none;
    border-radius: 0.5em;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-weight: 600;
    box-shadow: 0 0.125em 0.5em rgba(255, 107, 53, 0.3);
}

.add-unit-btn:hover {
    background: linear-gradient(135deg, #ff8a5b 0%, #ff7849 25%, #ff6b35 50%, #ff5722 75%, #f4511e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* Delete Floor Button
 * Double-class selector for specificity 0,2,0 to override .property-main-content button */
.delete-floor-btn.delete-floor-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    min-height: auto;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.delete-floor-btn:hover {
    background: rgba(220, 38, 38, 0.9);
}

/* Unit Details Grid - double-class selector for specificity 0,2,0 */
.unit-details-grid.unit-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.375rem;
}

/* Photo Gallery Grid (Unit Photos) */
.unit-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    grid-auto-rows: minmax(100px, auto);
    gap: 0.5em;
    background-color: transparent;
}

/* Photo Gallery Empty Message */
.photo-gallery-empty {
    grid-column: 1 / -1;
}

/* Photo Item in Grid Context (Unit Photos)
 * .unit-photo-gallery .photo-item = specificity 0,2,0, overrides .photo-item (0,1,0)
 * flex: none overrides flex: 0 0 100% on .photo-item — legitimate override of carousel styles */
.unit-photo-gallery .photo-item {
    flex: none !important;
    width: 100%;
    height: auto;
    min-height: 100px;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    display: block;
    background: #f3f4f6;
    border-radius: 8px;
}

.unit-photo-gallery .photo-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.unit-photo-gallery .photo-item img:hover {
    transform: scale(1.05);
}

/* Photo Item - Carousel Slide - Instagram style */
.photo-item {
    /* Flex basis is critical for carousel slides - use !important */
    flex: 0 0 100% !important;
    width: 100%;
    height: 100%;
    min-height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.photo-item img {
    /* Absolute positioning for full coverage */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Cover fit is critical for Instagram look - use !important */
    object-fit: cover !important;
    cursor: pointer;
    transition: transform 0.3s ease;
    user-select: none;
}

.photo-item img:hover {
    transform: scale(1.02);
}

/* Delete button on photo - Instagram style */
.photo-item .photo-delete-btn {
    position: absolute;
    top: 1em;
    left: 1em;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    border: none;
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 11;
    transition: all 0.2s ease;
    font-size: 0.875em;
    opacity: 0;
}

.photo-item:hover .photo-delete-btn {
    opacity: 1;
}

.photo-item .photo-delete-btn:hover {
    background: rgba(239, 68, 68, 0.95);
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

/* Note List Item */
.note-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.note-list-item-text {
    flex: 1;
    color: rgba(55, 65, 81, 0.9);
}

.note-delete-btn {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.note-delete-btn:hover {
    background: #dc2626;
}

/* Empty Note List Item */
.note-list-empty {
    list-style: none;
    padding-left: 0;
}

/**
 * ██╗   ██╗███████╗███╗   ██╗██████╗  ██████╗ ██████╗     ███╗   ███╗ ██████╗ ██████╗
 * ██║   ██║██╔════╝████╗  ██║██╔══██╗██╔═══██╗██╔══██╗    ████╗ ████║██╔════╝ ██╔══██╗
 * ██║   ██║█████╗  ██╔██╗ ██║██║  ██║██║   ██║██████╔╝    ██╔████╔██║██║  ███╗██████╔╝
 * ╚██╗ ██╔╝██╔══╝  ██║╚██╗██║██║  ██║██║   ██║██╔══██╗    ██║╚██╔╝██║██║   ██║██╔══██╗
 *  ╚████╔╝ ███████╗██║ ╚████║██████╔╝╚██████╔╝██║  ██║    ██║ ╚═╝ ██║╚██████╔╝██║  ██║
 *   ╚═══╝  ╚══════╝╚═╝  ╚═══╝╚═════╝  ╚═════╝ ╚═╝  ╚═╝    ╚═╝     ╚═╝ ╚═════╝ ╚═╝  ╚═╝
 *
 * COEUS DESIGN SYSTEM - VENDOR MANAGER COMPONENT
 *
 * PURPOSE:
 * Professional service provider (Dienstleister) management interface with iOS-inspired design
 * Comprehensive vendor cards, forms, and category management
 *
 * DESIGN PRINCIPLES:
 * - 8px spacing rhythm scale (8, 12, 16, 20, 24, 32, 40) for visual consistency
 * - Consistent container padding (24px) for professional appearance
 * - Enhanced touch targets (min 44px) following iOS HIG
 * - Glassmorphism effects with backdrop-filter for depth
 * - Smooth transitions for delightful interactions
 *
 * COMPONENTS:
 * - .vendor-card - Main vendor card with hover states
 * - .category-badge - Category pills with custom colors
 * - .stats-card - Statistics display card
 * - .form-input - iOS-styled form inputs
 * - .ios-button - Button variants (primary, danger, success)
 * - .ios-grid - Responsive vendor grid layout
 * - .ios-form-grid - Two-column form grid
 *
 * DEPENDENCIES:
 * - variables.css (design tokens)
 * - typography.css (font system)
 *
 * LAST UPDATED: 2025-10-26
 * VERSION: 1.0.0
 */

/* ============================================ */
/*           VENDOR CARD COMPONENT              */
/* ============================================ */

.vendor-card {
    background: var(--ios-glass-thin);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.vendor-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #f97316;
}

.vendor-card.active {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: var(--text-primary);
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

/* ============================================ */
/*           CATEGORY BADGE                     */
/* ============================================ */

.category-badge {
    padding: 6px 12px;
    border-radius: 296px;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
    font-size: var(--ios-caption1);
    font-weight: 600;
}

/* ============================================ */
/*           STATS CARD                         */
/* ============================================ */

.stats-card {
    background: var(--ios-glass-regular);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 24px;
}

/* ============================================ */
/*           FORM INPUTS                        */
/* ============================================ */

.form-input {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 16px;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
    font-size: var(--ios-body, 15px);
    color: var(--text-primary);
    transition: all 0.2s ease;
    /* Base styles - overridden by theme-specific rules below */
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
    outline: none;
}

/* ============================================ */
/*           BUTTON COMPONENTS                  */
/* ============================================ */

.ios-button {
    background: var(--ios-glass-regular);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    padding: 12px 24px;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
    font-size: var(--ios-callout);
    font-weight: 600;
    color: var(--ios-label);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 44px;
}

.ios-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.ios-button-primary {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: var(--text-primary);
    border: none;
}

.ios-button-primary:hover {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}

.ios-button-danger {
    background: var(--ios-system-red);
    color: var(--text-primary);
    border-color: var(--ios-system-red);
}

.ios-button-success {
    background: var(--ios-system-green);
    color: var(--text-primary);
    border-color: var(--ios-system-green);
}

.ios-button-secondary {
    background: var(--glass-secondary);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.ios-button-secondary:hover {
    background: var(--glass-hover);
}

/* ============================================ */
/*           LAYOUT GRIDS                       */
/* ============================================ */

.ios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding: 16px 0;
}

.ios-grid-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.ios-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ios-main-content {
    min-width: 0;
}

/* ============================================ */
/*           CATEGORY LIST                      */
/* ============================================ */

.ios-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.category-item.active,
.bg-blue-50 {
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid #f97316;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* ============================================ */
/*           FLEX UTILITIES                     */
/* ============================================ */

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-2 {
    gap: 8px;
}

/* ============================================ */
/*           TYPOGRAPHY UTILITIES               */
/* ============================================ */

.font-medium {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.text-sm {
    font-size: 13px;
}

.text-gray-500 {
    color: var(--text-secondary);
}

.text-gray-600 {
    color: var(--text-secondary);
}

/* iOS Typography */
.ios-title2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.ios-title3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.ios-large-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.ios-headline {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.ios-caption1 {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

.ios-caption2 {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-tertiary);
}

/* ============================================ */
/*           CARD HEADER                        */
/* ============================================ */

.ios-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ios-button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ios-icon-button {
    background: rgba(249, 115, 22, 0.1);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #f97316;
    transition: all 0.2s ease;
}

.ios-icon-button:hover {
    background: rgba(249, 115, 22, 0.2);
    transform: scale(1.05);
}

/* ============================================ */
/*           STATISTICS LIST                    */
/* ============================================ */

.ios-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ios-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
}

.ios-stat-row:first-child {
    padding-top: 0;
}

.ios-stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ios-stat-row .ios-caption1 {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.ios-stat-row .ios-headline {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================ */
/*           PAGE CONTENT                       */
/* ============================================ */

.ios-page-content {
    padding: 60px 24px;
    height: 100vh;
    overflow-y: auto;
    scroll-behavior: smooth;
    scroll-snap-type: none;
    -webkit-overflow-scrolling: touch;
}

/* ============================================ */
/*           UTILITY CLASSES                    */
/* ============================================ */

.cursor-pointer {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* ============================================ */
/*           EMPTY STATE                        */
/* ============================================ */

.no-data-message {
    text-align: center;
    padding: 40px 20px;
    color: #86868b;
    font-size: 15px;
}

.ios-empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
}

.ios-empty-state .ios-icon-large {
    font-size: 48px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    display: block;
}

.ios-empty-state .ios-title2 {
    margin-bottom: 8px;
}

.ios-empty-state .ios-body {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
}

/* ============================================ */
/*           FORM SECTIONS                      */
/* ============================================ */

.ios-form-section {
    margin-bottom: 32px;
}

.ios-form-section:last-child {
    margin-bottom: 0;
}

.ios-form-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.ios-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    max-width: 320px;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
    box-sizing: border-box;
}

.form-input:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: #f97316;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.form-input::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

textarea.form-input {
    margin-top: 0;
    padding: 14px 16px;
}

/* ============================================ */
/*           LIGHT THEME INPUTS                 */
/* ============================================ */

body[data-theme="light"] .form-input,
body[data-theme="light"] input[type="text"],
body[data-theme="light"] input[type="email"],
body[data-theme="light"] input[type="tel"],
body[data-theme="light"] input[type="number"],
body[data-theme="light"] input[type="color"],
body[data-theme="light"] textarea,
body[data-theme="light"] select {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

body[data-theme="light"] .form-input::placeholder,
body[data-theme="light"] input::placeholder,
body[data-theme="light"] textarea::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

body[data-theme="light"] .form-input:focus,
body[data-theme="light"] input:focus,
body[data-theme="light"] textarea:focus,
body[data-theme="light"] select:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* ============================================ */
/*           DARK THEME INPUTS                  */
/* ============================================ */

body[data-theme="dark"] .form-input,
body[data-theme="dark"] input[type="text"],
body[data-theme="dark"] input[type="email"],
body[data-theme="dark"] input[type="tel"],
body[data-theme="dark"] input[type="number"],
body[data-theme="dark"] textarea,
body[data-theme="dark"] select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* Higher specificity rule for form grid inputs - ensures all fields match */
body[data-theme="dark"] .ios-form-grid .form-input,
body[data-theme="dark"] .ios-form-grid input,
body[data-theme="dark"] .ios-form-grid select,
body[data-theme="dark"] .ios-form-grid textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

body[data-theme="dark"] .form-input:focus,
body[data-theme="dark"] input:focus,
body[data-theme="dark"] textarea:focus,
body[data-theme="dark"] select:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: #f97316;
}

body[data-theme="dark"] select option {
    background: #1a1a1a;
    color: var(--text-primary);
}

/* Ultra-specific vendor editor form inputs using ID selector - highest specificity */
body[data-theme="dark"] #vendorEditor .form-input,
body[data-theme="dark"] #vendorEditor input[type="text"],
body[data-theme="dark"] #vendorEditor input[type="email"],
body[data-theme="dark"] #vendorEditor input[type="tel"],
body[data-theme="dark"] #vendorEditor input[type="number"],
body[data-theme="dark"] #vendorEditor textarea,
body[data-theme="dark"] #vendorEditor select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* ============================================ */
/*           SECTION HEADERS                    */
/* ============================================ */

.section-header {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header:first-child {
    margin-top: 0;
}

.section-header i {
    color: #f97316;
}

/* ============================================ */
/*           FORM GROUPS                        */
/* ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* ============================================ */
/*           CHECKBOX/RADIO                     */
/* ============================================ */

input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.ios-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 0;
}

.ios-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #f97316;
}

/* ============================================ */
/*           INFO TEXT                          */
/* ============================================ */

.info-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 6px;
}

/* ============================================ */
/*           VENDOR OVERVIEW                    */
/* ============================================ */

#vendorOverview {
    margin-top: 32px;
}

#vendorOverview h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

/* ============================================ */
/*           REQUIRED FIELD                     */
/* ============================================ */

.required {
    color: #ff3b30;
}

/* ============================================ */
/*           ADDITIONAL UTILITIES               */
/* ============================================ */

.p-3 {
    padding: 12px;
}

.rounded-lg {
    border-radius: 12px;
}

.transition {
    transition: all 0.2s ease;
}

.hover\:bg-gray-50:hover {
    background: rgba(0, 0, 0, 0.03);
}

.border-blue-500 {
    border: 2px solid #f97316;
}

.text-xs {
    font-size: 11px;
}

.text-red-500 {
    color: #ff3b30;
}

.text-red-700 {
    color: #d32f2f;
}

.hover\:text-red-700:hover {
    color: #d32f2f;
}

.text-green-600 {
    color: #34c759;
}

.text-blue-600,
.text-orange-600 {
    color: #f97316;
}

.bg-orange-500 {
    background: #f97316;
}

.border-orange-500 {
    border-color: #f97316;
}

/* ============================================ */
/*           FORM GRID                          */
/* ============================================ */

.ios-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 16px;
    margin-top: 24px;
    padding: 0 10px;
}

.ios-form-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ios-form-field-full {
    grid-column: 1 / -1;
}

.ios-form-field-full input,
.ios-form-field-full textarea,
.ios-form-field-full select {
    max-width: calc(100% - 20px);
}

.ios-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

/* ============================================ */
/*           FORM STACK                         */
/* ============================================ */

.ios-form-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================ */
/*           SECTION DIVIDER                    */
/* ============================================ */

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    margin: 32px 0;
}

/* ============================================ */
/*           VENDOR-SPECIFIC UTILITIES          */
/* ============================================ */

/* Full-width button with top margin */
.btn-full-mt {
    width: 100%;
    margin-top: 16px;
}

/* Special card header (no border, custom spacing) */
.ios-card-header-noborder {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 16px;
}

/* Tall input (44px min height for touch) */
.h-11 {
    height: 44px;
}

/* ============================================ */
/*           RESPONSIVE MOBILE                  */
/* ============================================ */

@media (max-width: 768px) {
    .ios-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ios-form-field-full {
        grid-column: 1;
    }
}

/* ============================================ */
/*           THEME-SPECIFIC STYLES             */
/* ============================================ */

/* LIGHT THEME */
[data-theme="light"] .vendor-card,
[data-theme="light"] .category-item,
[data-theme="light"] .stats-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .vendor-card *,
[data-theme="light"] .category-item *,
[data-theme="light"] .stats-card * {
    color: var(--text-primary);
}

[data-theme="light"] .ios-title2,
[data-theme="light"] .ios-title3,
[data-theme="light"] .ios-large-title,
[data-theme="light"] .ios-headline,
[data-theme="light"] .font-medium {
    color: var(--text-primary);
}

[data-theme="light"] .ios-caption1,
[data-theme="light"] .text-gray-500,
[data-theme="light"] .text-gray-600 {
    color: var(--text-secondary);
}

[data-theme="light"] .ios-caption2 {
    color: var(--text-tertiary);
}

/* DARK THEME */
[data-theme="dark"] .vendor-card,
[data-theme="dark"] .category-item,
[data-theme="dark"] .stats-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .vendor-card *,
[data-theme="dark"] .category-item *,
[data-theme="dark"] .stats-card * {
    color: var(--text-primary);
}

[data-theme="dark"] .ios-title2,
[data-theme="dark"] .ios-title3,
[data-theme="dark"] .ios-large-title,
[data-theme="dark"] .ios-headline,
[data-theme="dark"] .font-medium {
    color: var(--text-primary);
}

[data-theme="dark"] .ios-caption1,
[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-600 {
    color: var(--text-tertiary);
}

[data-theme="dark"] .ios-caption2 {
    color: var(--text-quaternary);
}

[data-theme="dark"] .category-badge {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

/* DARKMODERN THEME */
[data-theme="darkmodern"] .vendor-card,
[data-theme="darkmodern"] .category-item,
[data-theme="darkmodern"] .stats-card {
    background: rgba(15, 20, 30, 0.65);
    border-color: rgba(248, 250, 252, 0.12);
}

[data-theme="darkmodern"] .vendor-card *,
[data-theme="darkmodern"] .category-item *,
[data-theme="darkmodern"] .stats-card * {
    color: rgba(248, 250, 252, 0.9);
}

[data-theme="darkmodern"] .ios-title2,
[data-theme="darkmodern"] .ios-title3,
[data-theme="darkmodern"] .ios-large-title,
[data-theme="darkmodern"] .ios-headline,
[data-theme="darkmodern"] .font-medium {
    color: rgba(248, 250, 252, 0.95);
}

[data-theme="darkmodern"] .ios-caption1,
[data-theme="darkmodern"] .text-gray-500,
[data-theme="darkmodern"] .text-gray-600 {
    color: rgba(248, 250, 252, 0.6);
}

[data-theme="darkmodern"] .ios-caption2 {
    color: rgba(248, 250, 252, 0.45);
}

[data-theme="darkmodern"] .category-badge {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

/* Active state consistent across all themes */
[data-theme="light"] .vendor-card.active,
[data-theme="dark"] .vendor-card.active,
[data-theme="darkmodern"] .vendor-card.active,
[data-theme="light"] .category-item.active,
[data-theme="dark"] .category-item.active,
[data-theme="darkmodern"] .category-item.active {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    border-color: #f97316;
}

[data-theme="light"] .vendor-card.active *,
[data-theme="dark"] .vendor-card.active *,
[data-theme="darkmodern"] .vendor-card.active *,
[data-theme="light"] .category-item.active *,
[data-theme="dark"] .category-item.active *,
[data-theme="darkmodern"] .category-item.active * {
    color: var(--text-primary) !important;
}

/* ============================================ */
/*           VENDOR SERVICES LIST               */
/* ============================================ */

.vendor-services-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vendor-service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vendor-service-item .service-name {
    font-weight: 500;
    color: var(--text-primary);
}

.vendor-service-item .service-price {
    font-size: 14px;
    color: var(--text-secondary);
    font-family: 'Noto Sans', monospace;
}

/* ============================================ */
/*     AGGRESSIVE INPUT FIELD FIX               */
/*     Force all inputs to have same styling    */
/* ============================================ */

/* Target ALL inputs inside vendorEditor regardless of column position */
#vendorEditor .ios-form-grid .ios-form-field input,
#vendorEditor .ios-form-grid .ios-form-field select,
#vendorEditor .ios-form-grid .ios-form-field textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* Even more specific - target by position in grid */
#vendorEditor .ios-form-grid .ios-form-field:nth-child(n) input,
#vendorEditor .ios-form-grid .ios-form-field:nth-child(n) select,
#vendorEditor .ios-form-grid .ios-form-field:nth-child(n) textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* Light theme override */
body[data-theme="light"] #vendorEditor .ios-form-grid .ios-form-field input,
body[data-theme="light"] #vendorEditor .ios-form-grid .ios-form-field select,
body[data-theme="light"] #vendorEditor .ios-form-grid .ios-form-field textarea {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

/* Fix select dropdown options for dark themes */
body[data-theme="dark"] #vendorEditor select option,
body[data-theme="darkmodern"] #vendorEditor select option {
    background: #1a1a1a;
    color: var(--text-primary);
}

/* ============================================ */
/*           VENDOR EDITOR CLOSE BUTTON         */
/* ============================================ */

/* Small corner close button for vendor details panel */
#vendorEditor .ios-card-header .ios-button-secondary[title="Schliessen"],
#vendorEditor .ios-card-header button[onclick*="closeVendorEditor"] {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(120, 120, 128, 0.3);
    border: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
}

#vendorEditor .ios-card-header .ios-button-secondary[title="Schliessen"]:hover,
#vendorEditor .ios-card-header button[onclick*="closeVendorEditor"]:hover {
    background: rgba(120, 120, 128, 0.5);
    transform: scale(1.1);
}

#vendorEditor .ios-card-header .ios-button-secondary[title="Schliessen"] svg,
#vendorEditor .ios-card-header button[onclick*="closeVendorEditor"] svg {
    width: 12px;
    height: 12px;
}

/**
 * COEUS DESIGN SYSTEM - HELP PAGE COMPONENT
 *
 * PURPOSE:
 * Help/documentation page specific styles
 * Hierarchy visualization and feature cards
 *
 * LAST UPDATED: 2025-10-26
 * VERSION: 1.0.0
 */

/* ============================================ */
/*           GLASSMORPHISM                      */
/* ============================================ */

.glassmorphism {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ============================================ */
/*           HIERARCHY BOX                      */
/* ============================================ */

.hierarchy-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.hierarchy-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Hierarchy box variants */
.hierarchy-box-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.hierarchy-box-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.hierarchy-box-green {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.hierarchy-box-orange {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* ============================================ */
/*           CONNECTOR                          */
/* ============================================ */

.connector {
    width: 2px;
    background: #cbd5e0;
    margin-left: 50%;
    transform: translateX(-50%);
}

/* ============================================ */
/*           FEATURE CARD                       */
/* ============================================ */

.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.feature-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/**
 * COEUS DESIGN SYSTEM - GDPR DASHBOARD COMPONENT
 *
 * Multi-Jurisdiction Privacy Compliance Dashboard Styles
 * Supports: EU GDPR, Swiss DSG, CCPA, EU AI Act
 *
 * CREATED: 2025-12-11
 * VERSION: 2.0.0
 */

/* ============================================ */
/*          GDPR DASHBOARD BASE                 */
/* ============================================ */

.gdpr-dashboard {
    max-width: 70em;
    margin: 0 auto;
}

.gdpr-header {
    margin-bottom: 2em;
}

.gdpr-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
}

.gdpr-header h2 {
    margin: 0;
}

.gdpr-subtitle {
    margin-top: 0.5em;
    opacity: 0.8;
}

/* ============================================ */
/*          JURISDICTION SELECTOR               */
/* ============================================ */

.jurisdiction-selector {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

.jurisdiction-label {
    font-weight: 500;
    white-space: nowrap;
}

.jurisdiction-select {
    padding: 0.5em 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.95em;
}

.jurisdiction-select:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

/* ============================================ */
/*          STATS GRID                          */
/* ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1em;
    margin-bottom: 2em;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1.25em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.stat-icon {
    font-size: 2em;
}

.stat-number {
    font-size: 1.75em;
    font-weight: 600;
}

.stat-label {
    font-size: 0.85em;
    opacity: 0.75;
}

.stat-status {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--ios-system-green);
}

/* ============================================ */
/*          GDPR SECTIONS                       */
/* ============================================ */

.gdpr-sections {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

.gdpr-section {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5em;
}

.section-header {
    margin-bottom: 1.5em;
}

.section-header h3 {
    margin: 0 0 0.5em 0;
}

.section-header p {
    margin: 0;
    opacity: 0.75;
}

/* ============================================ */
/*          CONSENT CONTROLS                    */
/* ============================================ */

.consent-controls {
    margin-bottom: 1.5em;
}

.loading-state {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 1em;
    opacity: 0.7;
}

.consent-categories {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.consent-category {
    padding: 1em;
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.consent-category.required {
    border-left: 3px solid var(--ios-system-orange);
}

.consent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75em;
}

.consent-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.required-badge {
    font-size: 0.75em;
    padding: 0.2em 0.5em;
    background: var(--ios-system-orange);
    color: var(--text-primary);
    border-radius: 4px;
    font-weight: normal;
}

.consent-description {
    margin: 0 0 0.75em 0;
    font-size: 0.9em;
    opacity: 0.85;
}

.consent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    font-size: 0.8em;
    opacity: 0.7;
}

.consent-status {
    margin-top: 0.5em;
    font-size: 0.8em;
    opacity: 0.6;
}

.consent-actions {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 3em;
    height: 1.75em;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--glass-secondary);
    transition: 0.3s;
    border: 1px solid var(--glass-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 1.25em;
    width: 1.25em;
    left: 0.2em;
    bottom: 0.2em;
    background-color: var(--text-primary);
    transition: 0.3s;
}

input:checked + .slider {
    background-color: var(--ios-system-green);
    border-color: var(--ios-system-green);
}

input:checked + .slider:before {
    transform: translateX(1.25em);
}

.slider.round {
    border-radius: 1.75em;
}

.slider.round:before {
    border-radius: 50%;
}

/* ============================================ */
/*          RIGHTS GRID                         */
/* ============================================ */

.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1em;
}

.right-card {
    display: flex;
    gap: 1em;
    padding: 1em;
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.right-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.right-content h4 {
    margin: 0 0 0.5em 0;
    font-size: 0.95em;
}

.right-content p {
    margin: 0 0 1em 0;
    font-size: 0.85em;
    opacity: 0.75;
}

/* ============================================ */
/*          CCPA SECTION                        */
/* ============================================ */

.ccpa-section {
    border-left: 4px solid var(--ios-system-orange, #FF9500);
}

.ccpa-rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1em;
    margin-bottom: 1em;
}

.ccpa-right-card {
    display: flex;
    gap: 1em;
    padding: 1em;
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.ccpa-notice {
    border-left: 3px solid var(--ios-system-orange, #FF9500);
}

/* ============================================ */
/*          AI DISCLOSURE SECTION               */
/* ============================================ */

.ai-disclosure-section {
    border-left: 4px solid var(--ios-system-purple, #AF52DE);
}

.ai-systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1em;
    margin-bottom: 1em;
}

.ai-system-card {
    border: 1px solid var(--glass-border);
}

.ai-system-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75em;
}

.ai-system-header h4 {
    margin: 0;
}

.risk-badge {
    font-size: 0.75em;
    padding: 0.2em 0.6em;
    border-radius: 4px;
    font-weight: 500;
}

.risk-badge.minimal {
    background: var(--ios-system-green);
    color: var(--text-primary);
}

.risk-badge.limited {
    background: var(--ios-system-orange);
    color: var(--text-primary);
}

.risk-badge.high {
    background: var(--ios-system-orange, #FF9500);
    color: var(--text-primary);
}

.risk-badge.unacceptable {
    background: var(--ios-system-red);
    color: var(--text-primary);
}

.ai-system-details p {
    margin: 0.4em 0;
    font-size: 0.85em;
}

.ai-notice {
    border-left: 3px solid var(--ios-system-purple, #AF52DE);
}

.ai-notice h4 {
    margin: 0 0 0.75em 0;
}

.ai-notice ul {
    margin: 0;
    padding-left: 1.25em;
}

.ai-notice li {
    margin-bottom: 0.4em;
}

/* ============================================ */
/*          COOKIE CONSENT HISTORY              */
/* ============================================ */

.cookie-consent-section {
    border-left: 4px solid var(--coeus-primary, #ff6600);
}

.cookie-consent-content {
    margin-bottom: 1em;
}

.cookie-history-table {
    overflow-x: auto;
    margin-bottom: 1em;
}

.cookie-history-table table {
    width: 100%;
    border-collapse: collapse;
}

.cookie-history-table th,
.cookie-history-table td {
    padding: 0.75em 1em;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.cookie-history-table th {
    font-weight: 600;
    background: var(--glass-secondary);
}

.cookie-history-table tbody tr:hover {
    background: var(--glass-hover);
}

.cookie-history-table tbody tr.inactive {
    opacity: 0.6;
}

.cookie-current-status h4 {
    margin: 0 0 1em 0;
}

.preference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1em;
}

.preference-item {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em;
    background: var(--glass-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

.preference-item.enabled {
    border-left: 3px solid var(--ios-system-green);
}

.preference-item.disabled {
    border-left: 3px solid var(--ios-system-red);
    opacity: 0.8;
}

.preference-icon {
    font-size: 1.25em;
}

.preference-label {
    flex: 1;
    font-weight: 500;
}

.preference-status {
    font-size: 0.8em;
    padding: 0.2em 0.5em;
    background: var(--glass-primary);
    border-radius: 4px;
}

.preference-status.required {
    background: var(--ios-system-orange);
    color: var(--text-primary);
}

.preference-timestamp {
    margin-top: 1em;
}

.cookie-consent-actions {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
}

.status-badge.active {
    background: var(--ios-system-green);
    color: var(--text-primary);
}

.status-badge.withdrawn {
    background: var(--ios-system-gray, #8E8E93);
    color: var(--text-primary);
}

/* ============================================ */
/*          REQUESTS TABLE                      */
/* ============================================ */

.requests-table {
    overflow-x: auto;
}

.requests-table table {
    width: 100%;
    border-collapse: collapse;
}

.requests-table th,
.requests-table td {
    padding: 0.75em 1em;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.requests-table th {
    font-weight: 600;
    background: var(--glass-secondary);
}

.requests-table tbody tr:hover {
    background: var(--glass-hover);
}

.status-badge {
    display: inline-block;
    padding: 0.25em 0.75em;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-badge.pending {
    background: var(--ios-system-yellow, #FFCC00);
    color: var(--text-primary);
}

.status-badge.in_progress {
    background: var(--ios-system-orange);
    color: var(--text-primary);
}

.status-badge.completed {
    background: var(--ios-system-green);
    color: var(--text-primary);
}

.status-badge.rejected {
    background: var(--ios-system-red);
    color: var(--text-primary);
}

/* ============================================ */
/*          EMPTY STATE                         */
/* ============================================ */

.empty-state {
    text-align: center;
    padding: 2em;
    opacity: 0.75;
}

.empty-icon {
    font-size: 3em;
    margin-bottom: 0.5em;
}

.empty-state h4 {
    margin: 0 0 0.5em 0;
}

.empty-state p {
    margin: 0;
}

/* ============================================ */
/*          PRIVACY INFO                        */
/* ============================================ */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1em;
    margin-bottom: 1.5em;
}

.info-card {
    padding: 1em;
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
}

.info-card h4 {
    margin: 0 0 0.5em 0;
}

.info-card p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.85;
}

.privacy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
}

.privacy-link {
    padding: 0.5em 1em;
    background: var(--glass-secondary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.2s;
}

.privacy-link:hover {
    background: var(--glass-hover);
}

/* ============================================ */
/*          MODAL                               */
/* ============================================ */

.gdpr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1em;
}

.gdpr-modal {
    max-width: 50em;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    opacity: 1;
}

.modal-footer {
    margin-top: 1.5em;
    display: flex;
    justify-content: flex-end;
}

.ccpa-categories-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.ccpa-categories-table th,
.ccpa-categories-table td {
    padding: 0.75em;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.ccpa-categories-table th {
    background: var(--glass-secondary);
    font-weight: 600;
}

.ccpa-summary {
    background: var(--glass-secondary);
    padding: 1em;
    border-radius: var(--radius-md);
}

.ccpa-summary p {
    margin: 0.5em 0;
}

/* ============================================ */
/*          BUTTONS                             */
/* ============================================ */

.btn {
    padding: 0.5em 1em;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-primary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--glass-hover);
}

.btn-primary {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
    color: var(--text-primary);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-danger {
    background: var(--ios-system-red);
    border-color: var(--ios-system-red);
    color: var(--text-primary);
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
}

.btn-outline:hover {
    background: var(--glass-secondary);
}

.btn-sm {
    padding: 0.35em 0.75em;
    font-size: 0.85em;
}

/* ============================================ */
/*          NOTIFICATIONS                       */
/* ============================================ */

.notification {
    position: fixed;
    bottom: 1em;
    right: 1em;
    padding: 1em 1.5em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    z-index: 10000;
    max-width: 25em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.success {
    border-left: 4px solid var(--ios-system-green);
}

.notification.error {
    border-left: 4px solid var(--ios-system-red);
}

.notification.info {
    border-left: 4px solid var(--ios-system-orange);
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.25em;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
}

.notification-close:hover {
    opacity: 1;
}

/* ============================================ */
/*          ERROR STATE                         */
/* ============================================ */

.gdpr-error {
    text-align: center;
    padding: 3em;
}

.error-icon {
    font-size: 3em;
    margin-bottom: 1em;
}

.gdpr-error h3 {
    margin: 0 0 0.75em 0;
}

.gdpr-error p {
    margin: 0 0 1.5em 0;
    opacity: 0.75;
}

/* ============================================ */
/*          RESPONSIVE                          */
/* ============================================ */

@media (max-width: 48em) {
    .gdpr-header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .jurisdiction-selector {
        width: 100%;
    }

    .jurisdiction-select {
        flex: 1;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rights-grid,
    .ccpa-rights-grid,
    .ai-systems-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .consent-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75em;
    }

    .consent-actions {
        flex-direction: column;
    }

    .consent-actions .btn {
        width: 100%;
    }
}

/* ============================================ */
/*          PRINT STYLES                        */
/* ============================================ */

@media print {
    .gdpr-dashboard {
        max-width: 100%;
    }

    .jurisdiction-selector,
    .consent-actions,
    .btn,
    .notification {
        display: none;
    }

    .gdpr-section {
        page-break-inside: avoid;
        background: white;
    }
}

/**
 * Cookie Consent Banner Styles
 *
 * GDPR/nDSG/CCPA compliant cookie consent banner
 * Glassmorphism design matching COEUS design system
 *
 * @created 2025-12-11
 * @updated 2026-01-19 - Fixed centering: uses left: 50% + translateX(-50%)
 *                       to ensure banner is centered on all pages including
 *                       those with sidebars
 */

/* ============================================ */
/*          BANNER OVERLAY                      */
/* ============================================ */

.cookie-consent-banner {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(100%);
    width: calc(100% - 2em);
    max-width: 52em;
    z-index: 99999 !important;
    padding: 1em;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.cookie-consent-banner.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* ============================================ */
/*          BANNER CONTAINER                    */
/* ============================================ */

.cookie-consent-container {
    width: 100%;
    padding: 1.5em;
    background: rgba(20, 20, 20, 0.92) !important;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ============================================ */
/*          HEADER                              */
/* ============================================ */

.cookie-consent-header {
    margin-bottom: 1em;
}

.cookie-consent-header h3 {
    margin: 0;
    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-primary, rgba(255, 255, 255, 0.95));
}

/* ============================================ */
/*          BODY                                */
/* ============================================ */

.cookie-consent-body {
    margin-bottom: 1.25em;
}

.cookie-consent-description {
    margin: 0 0 1em 0;
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--text-secondary, rgba(255, 255, 255, 0.75));
}

/* ============================================ */
/*          OPTIONS                             */
/* ============================================ */

.cookie-consent-options {
    margin: 1em 0;
    padding: 1em;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.cookie-option {
    padding: 0.75em 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-option:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cookie-option:first-child {
    padding-top: 0;
}

.cookie-option-header {
    display: flex;
    align-items: center;
}

.cookie-option-label {
    display: flex;
    align-items: center;
    gap: 0.75em;
    cursor: pointer;
    flex: 1;
}

.cookie-option-label input[type="checkbox"] {
    width: 1.25em;
    height: 1.25em;
    accent-color: #ff6600;
    cursor: pointer;
}

.cookie-option-label input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-option-title {
    font-weight: 500;
    color: var(--text-primary, rgba(255, 255, 255, 0.95));
}

.cookie-option-required {
    font-size: 0.75em;
    padding: 0.2em 0.5em;
    background: #ff6600;
    color: var(--text-primary);
    border-radius: 4px;
    margin-left: auto;
}

.cookie-option-desc {
    margin: 0.5em 0 0 2em;
    font-size: 0.85em;
    color: var(--text-tertiary, rgba(255, 255, 255, 0.55));
    line-height: 1.4;
}

/* ============================================ */
/*          LINKS                               */
/* ============================================ */

.cookie-consent-links {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

.cookie-consent-links a {
    color: #ff6600;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.cookie-consent-links a:hover {
    color: #ff8533;
    text-decoration: underline;
}

.cookie-consent-links .separator {
    color: var(--text-quaternary, rgba(255, 255, 255, 0.35));
    font-size: 0.8em;
}

/* ============================================ */
/*          ACTIONS                             */
/* ============================================ */

.cookie-consent-actions {
    display: flex;
    gap: 0.75em;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-actions-customize {
    justify-content: center;
}

/* ============================================ */
/*          BUTTONS                             */
/* ============================================ */

.cookie-btn {
    padding: 0.65em 1.25em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
    border-color: #ff6600;
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}

.cookie-btn-primary:hover {
    background: linear-gradient(135deg, #ff7722 0%, #ff9955 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.5);
}

.cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
}

.cookie-btn-outline {
    background: transparent;
    color: var(--text-primary);
}

.cookie-btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ============================================ */
/*          RESPONSIVE                          */
/* ============================================ */

@media (max-width: 40em) {
    .cookie-consent-banner {
        padding: 0.5em;
    }

    .cookie-consent-container {
        padding: 1.25em;
        border-radius: var(--radius-md, 16px);
    }

    .cookie-consent-header h3 {
        font-size: 1.1em;
    }

    .cookie-consent-description {
        font-size: 0.9em;
    }

    .cookie-consent-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-option-desc {
        margin-left: 0;
        margin-top: 0.5em;
    }
}

/* ============================================ */
/*          LIGHT THEME ADJUSTMENTS             */
/* ============================================ */

[data-theme="light"] .cookie-consent-container {
    background: rgba(40, 40, 40, 0.95) !important;
}

[data-theme="light"] .cookie-consent-header h3,
[data-theme="light"] .cookie-option-title {
    color: var(--text-primary);
}

[data-theme="light"] .cookie-consent-description,
[data-theme="light"] .cookie-option-desc {
    color: var(--text-secondary);
}

/* ============================================ */
/*          ANIMATIONS                          */
/* ============================================ */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.cookie-consent-banner.visible {
    animation: slideUp 0.3s ease forwards;
}

/* ============================================ */
/*          PRINT - HIDE BANNER                 */
/* ============================================ */

@media print {
    .cookie-consent-banner {
        display: none !important;
    }
}

/**
 * @file quote-card.css
 * @filepath public/css/components/quote-card.css
 * @description Styling for quote cards (Kostenvoranschlag) used in chat and modals
 * @created 2025-12-17
 *
 * Used in:
 * - messages.html (owner messages page)
 * - vendor-dashboard.html (vendor quote builder)
 *
 * Theme-aware using CSS variables from themes-v2.css
 */

/* ============================================================================
   QUOTE CARD BASE
   ============================================================================ */

.quote-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
}

/* Status-based styling */
.quote-card[data-status="draft"] {
    border-left: 4px solid var(--text-tertiary);
    opacity: 0.8;
}

.quote-card[data-status="sent"] {
    border-left: 4px solid var(--ios-system-orange);
}

.quote-card[data-status="accepted"] {
    border-left: 4px solid var(--ios-system-green);
    background: rgba(52, 199, 89, 0.05);
}

.quote-card[data-status="rejected"] {
    border-left: 4px solid var(--ios-system-red);
    opacity: 0.7;
}

.quote-card[data-status="expired"] {
    border-left: 4px solid var(--text-quaternary);
    opacity: 0.6;
}

.quote-card[data-status="withdrawn"] {
    border-left: 4px solid var(--ios-system-orange);
    opacity: 0.7;
}

.quote-card[data-status="completed"] {
    border-left: 4px solid var(--ios-system-green);
}

/* ============================================================================
   QUOTE CARD HEADER
   ============================================================================ */

.quote-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.quote-card-title {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--ios-system-orange);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quote-card-date {
    font-size: 0.75em;
    color: var(--text-tertiary);
}

.quote-card-name {
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
}

/* ============================================================================
   QUOTE DELIVERABLES LIST
   ============================================================================ */

.quote-deliverables {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.quote-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-secondary);
    border-radius: var(--radius-sm);
}

.quote-item.optional {
    border: 1px dashed var(--glass-border);
    background: transparent;
    opacity: 0.7;
}

.quote-item .item-title {
    font-size: 0.9375em;
    color: var(--text-primary);
}

.quote-item.optional .item-title::before {
    content: "Optional: ";
    color: var(--ios-system-orange);
    font-weight: 500;
}

.quote-item .item-price {
    font-size: 0.9375em;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

/* ============================================================================
   QUOTE TOTALS SECTION
   ============================================================================ */

.quote-totals {
    border-top: 1px solid var(--glass-border);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.quote-subtotal,
.quote-mwst,
.quote-total {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-xs) 0;
}

.quote-subtotal {
    font-size: 0.9375em;
    color: var(--text-secondary);
}

.quote-mwst {
    font-size: 0.875em;
    color: var(--text-tertiary);
}

.quote-total {
    font-size: 1.25em;
    font-weight: 600;
    color: var(--ios-system-green);
    border-top: 1px solid var(--glass-border);
    padding-top: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}

/* ============================================================================
   VARIABLE COSTS WARNING
   ============================================================================ */

.quote-variable {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.3);
    border-radius: var(--radius-sm);
}

.quote-variable p {
    margin: 0;
    font-size: 0.875em;
}

.quote-variable p:first-child {
    color: var(--ios-system-orange);
    font-weight: 500;
}

/* ============================================================================
   QUOTE ACTIONS
   ============================================================================ */

.quote-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.quote-actions .btn-reject,
.quote-actions .btn-accept {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375em;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.quote-actions .btn-reject {
    background: var(--glass-secondary);
    color: var(--ios-system-red);
}

.quote-actions .btn-reject:hover {
    background: rgba(255, 59, 48, 0.15);
}

.quote-actions .btn-accept {
    background: var(--ios-system-green);
    color: var(--text-primary);
}

.quote-actions .btn-accept:hover {
    opacity: 0.9;
}

/* ============================================================================
   QUOTE STATUS BADGES
   ============================================================================ */

.quote-status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.25em 0.75em;
    border-radius: var(--radius-sm);
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.quote-status-badge.draft {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
}

.quote-status-badge.sent {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

.quote-status-badge.accepted {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

.quote-status-badge.rejected {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

.quote-status-badge.expired {
    background: var(--glass-secondary);
    color: var(--text-quaternary);
}

.quote-status-badge.withdrawn {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

.quote-status-badge.completed {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

/* ============================================================================
   QUOTE BUILDER (Vendor Side)
   ============================================================================ */

.quote-builder {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.quote-builder-section {
    padding: var(--spacing-lg);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.quote-builder-section h4 {
    margin: 0 0 var(--spacing-md) 0;
    font-size: 1em;
    color: var(--text-primary);
}

/* Item Editor */
.quote-item-editor {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.quote-item-editor-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.quote-item-position {
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-primary);
    border-radius: 50%;
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-secondary);
}

.quote-item-title-input {
    flex: 1;
    padding: var(--spacing-sm);
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9375em;
    font-weight: 500;
}

.btn-remove-item {
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
}

.btn-remove-item:hover {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

.quote-item-pricing {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: flex-end;
}

.quote-item-pricing .form-group {
    flex: 1;
    min-width: 6em;
}

.quote-item-pricing label {
    display: block;
    font-size: 0.75em;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-xs);
}

.quote-item-pricing select,
.quote-item-pricing input {
    width: 100%;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875em;
}

.quote-item-total {
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 6em;
    text-align: right;
}

.quote-item-optional-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.8125em;
    color: var(--text-secondary);
}

.btn-add-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-add-item:hover {
    background: var(--glass-primary);
    border-color: var(--ios-system-orange);
    color: var(--ios-system-orange);
}

/* Variable Costs Toggle */
.variable-costs-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
}

.variable-costs-toggle label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
}

.variable-costs-fields {
    display: none;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.variable-costs-fields.visible {
    display: flex;
}

/* Preview Section */
.quote-preview {
    padding: var(--spacing-lg);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.quote-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.quote-preview-title {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Quote Builder Actions */
.quote-builder-actions {
    display: flex;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--glass-border);
}

.btn-save-draft,
.btn-send-quote {
    flex: 1;
    padding: var(--spacing-md);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375em;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-save-draft {
    background: var(--glass-secondary);
    color: var(--text-primary);
}

.btn-save-draft:hover {
    background: var(--glass-hover);
}

.btn-send-quote {
    background: var(--ios-system-green);
    color: var(--text-primary);
}

.btn-send-quote:hover {
    opacity: 0.9;
}

.btn-send-quote:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 36em) {
    .quote-item-pricing {
        flex-direction: column;
    }

    .quote-item-pricing .form-group {
        min-width: 100%;
    }

    .quote-item-total {
        width: 100%;
        text-align: left;
        padding-top: var(--spacing-xs);
        border-top: 1px solid var(--glass-border);
    }

    .quote-actions {
        flex-direction: column;
    }

    .quote-builder-actions {
        flex-direction: column;
    }
}

/**
 * @file nebenkosten-modal.css
 * @description Styling for Nebenkosten configuration modals (building & unit)
 *
 * Design:
 * - Accent color: Sunset orange (--ios-system-orange) for selected states
 * - Theme-aware using CSS variables
 * - Glass morphism effects
 * - Responsive layout
 *
 * Dependencies:
 * - /public/css/components/modals.css (base modal styles)
 * - /public/css/core/variables-v2.css (color variables)
 */

/* =============================================================================
   MODAL OVERLAY EXTENSIONS
   ============================================================================= */

.nebenkosten-modal-overlay {
    z-index: 10001;
}

.nebenkosten-modal-overlay:not(.open) {
    display: none;
}

.nebenkosten-modal-overlay.open {
    display: flex;
}

.nebenkosten-modal-content {
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.nebenkosten-modal-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-md, 1rem);
    padding: var(--space-md, 1rem) 0;
}

/* =============================================================================
   BUILDING HEADER
   ============================================================================= */

.nk-building-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md, 1rem);
    border-radius: var(--radius-md, 12px);
}

.nk-building-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 0.25rem);
}

.nk-building-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.nk-building-address {
    font-size: 0.875rem;
}

.nk-building-country {
    padding: var(--space-xs, 0.25rem) var(--space-sm, 0.5rem);
    background: var(--glass-hover);
    border-radius: var(--radius-sm, 8px);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* =============================================================================
   SECTIONS
   ============================================================================= */

.nk-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 0.5rem);
}

.nk-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xs, 0.25rem);
}

.nk-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.nk-section-content {
    padding: 0 var(--space-xs, 0.25rem);
}

/* =============================================================================
   CATEGORIES LIST
   ============================================================================= */

.nk-categories-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 0.5rem);
    max-height: 350px;
    overflow-y: auto;
    padding: var(--space-xs, 0.25rem);
    margin: 0 calc(-1 * var(--space-xs, 0.25rem));
}

.nk-loading {
    text-align: center;
    padding: var(--space-xl, 2rem);
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.nk-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    padding: var(--space-xl, 2rem);
    color: var(--text-tertiary);
}

.nk-empty-state .radix-icon {
    font-size: 1.5rem;
    opacity: 0.5;
}

/* =============================================================================
   CATEGORY ITEM
   ============================================================================= */

.nk-category-item {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md, 12px);
    padding: var(--space-md, 1rem);
    transition: all 0.2s ease;
}

.nk-category-item:hover {
    background: var(--glass-hover);
}

/* Selected state - sunset orange accent */
.nk-category-item.selected {
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 1px var(--ios-system-orange);
}

.nk-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md, 1rem);
}

.nk-category-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    cursor: pointer;
    flex: 1;
}

.nk-category-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--ios-system-orange);
}

.nk-category-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

/* Method badge */
.nk-category-method {
    font-size: 0.75rem;
    padding: var(--space-xs, 0.25rem) var(--space-sm, 0.5rem);
    border-radius: var(--radius-sm, 8px);
    background: var(--glass-secondary);
    color: var(--text-tertiary);
    white-space: nowrap;
}

.nk-category-method.consumption {
    background: rgba(var(--ios-blue-rgb, 0, 122, 255), 0.15);
    color: var(--ios-system-orange);
}

.nk-category-method.fixed {
    background: rgba(var(--ios-green-rgb, 52, 199, 89), 0.15);
    color: var(--ios-system-green);
}

/* =============================================================================
   CATEGORY CONFIG PANEL
   ============================================================================= */

.nk-category-config {
    display: none;
    padding-top: var(--space-md, 1rem);
    margin-top: var(--space-md, 1rem);
    border-top: 1px solid var(--glass-border);
}

.nk-category-config.visible {
    display: block;
}

.nk-config-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md, 1rem);
}

.nk-config-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 0.25rem);
}

.nk-config-field label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.nk-config-field select,
.nk-config-field input {
    padding: var(--space-sm, 0.5rem);
    font-size: 0.875rem;
}

/* =============================================================================
   INFO BOX
   ============================================================================= */

.nk-info-box {
    display: flex;
    gap: var(--space-md, 1rem);
    padding: var(--space-md, 1rem);
    border-radius: var(--radius-md, 12px);
    background: rgba(var(--ios-blue-rgb, 0, 122, 255), 0.08);
    border: 1px solid rgba(var(--ios-blue-rgb, 0, 122, 255), 0.2);
}

.nk-info-box .radix-icon {
    color: var(--ios-system-orange);
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.nk-info-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 0.25rem);
}

.nk-info-content strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.nk-info-content p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Info box with action button */
.nk-info-box-action {
    align-items: center;
    background: rgba(var(--ios-orange-rgb, 255, 149, 0), 0.08);
    border-color: rgba(var(--ios-orange-rgb, 255, 149, 0), 0.2);
}

.nk-info-box-action .radix-icon {
    color: var(--ios-system-orange);
}

.nk-info-box-action .nk-info-content {
    flex: 1;
}

.nk-info-box-action .glass-button {
    flex-shrink: 0;
    white-space: nowrap;
}

/* =============================================================================
   SKIPPED UNITS DIALOG
   ============================================================================= */

.nk-skipped-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 0.5rem);
}

.nk-skipped-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    background: var(--glass-primary);
    border-radius: var(--radius-sm, 8px);
}

.nk-skipped-label {
    font-weight: 500;
    color: var(--text-primary);
}

.nk-skipped-tenant {
    font-size: 0.875rem;
}

/* =============================================================================
   NOTIFICATION TOAST
   ============================================================================= */

.nk-toast {
    position: fixed;
    bottom: var(--space-xl, 2rem);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    background: var(--glass-secondary);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 0.9375rem;
    z-index: 10002;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.nk-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.nk-toast-success {
    border-color: var(--ios-system-green);
}

.nk-toast-error {
    border-color: var(--ios-system-red);
}

.nk-toast-warning {
    border-color: var(--ios-system-orange);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 48em) {
    .nebenkosten-modal-content {
        max-width: 95%;
        max-height: 90vh;
    }

    .nk-config-row {
        grid-template-columns: 1fr;
    }

    .nk-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm, 0.5rem);
    }

    .nk-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm, 0.5rem);
    }
}

/* =============================================================================
   UNIT NEBENKOSTEN MODAL EXTENSIONS
   ============================================================================= */

/* Mini dashboard stats */
.nk-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md, 1rem);
}

.nk-stat-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md, 12px);
    padding: var(--space-md, 1rem);
    text-align: center;
}

.nk-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nk-stat-value.positive {
    color: var(--ios-system-green);
}

.nk-stat-value.negative {
    color: var(--ios-system-red);
}

.nk-stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: var(--space-xs, 0.25rem);
}

/* Trend chart container */
.nk-trend-chart {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md, 12px);
    padding: var(--space-md, 1rem);
    min-height: 200px;
}

/* Warning banner for active contracts */
.nk-warning-banner {
    display: flex;
    align-items: center;
    gap: var(--space-md, 1rem);
    padding: var(--space-md, 1rem);
    background: rgba(var(--ios-orange-rgb, 255, 149, 0), 0.12);
    border: 1px solid var(--ios-system-orange);
    border-radius: var(--radius-md, 12px);
    color: var(--text-primary);
}

.nk-warning-banner .radix-icon {
    color: var(--ios-system-orange);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.nk-warning-content {
    flex: 1;
}

.nk-warning-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: var(--space-xs, 0.25rem);
}

.nk-warning-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Inherit toggle */
.nk-inherit-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-md, 1rem);
    padding: var(--space-md, 1rem);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md, 12px);
}

.nk-inherit-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--ios-system-orange);
}

.nk-inherit-label {
    flex: 1;
}

.nk-inherit-title {
    font-weight: 500;
    color: var(--text-primary);
}

.nk-inherit-desc {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: var(--space-xs, 0.25rem);
}

/* Tabs for unit modal */
.nk-tabs {
    display: flex;
    gap: var(--space-xs, 0.25rem);
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: var(--space-md, 1rem);
}

.nk-tab {
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.nk-tab:hover {
    color: var(--text-primary);
}

.nk-tab.active {
    color: var(--ios-system-orange);
}

.nk-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--ios-system-orange);
    border-radius: 1px 1px 0 0;
}

.nk-tab-content {
    display: none;
}

.nk-tab-content.active {
    display: block;
}

/* Category breakdown table */
.nk-category-breakdown {
    width: 100%;
    border-collapse: collapse;
}

.nk-category-breakdown th,
.nk-category-breakdown td {
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.nk-category-breakdown th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nk-category-breakdown td {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.nk-category-breakdown tr:last-child td {
    border-bottom: none;
}

@media (max-width: 48em) {
    .nk-stats-grid {
        grid-template-columns: 1fr;
    }

    .nk-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nk-category-breakdown {
        font-size: 0.8125rem;
    }
}

/* =============================================================================
   MODAL FOOTER EXTENSIONS
   ============================================================================= */

/* Spacer to push buttons to the right */
.modal-footer-spacer {
    flex: 1;
}

/* Nebenkosten button in building modal */
#openBuildingNKBtn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs, 0.25rem);
}

#openBuildingNKBtn .radix-icon {
    font-size: 1rem;
}

/* =============================================================================
   LIGHT THEME OVERRIDES
   ============================================================================= */

/* Light theme: Nebenkosten sub-tabs */
[data-theme="light"] .nk-tabs,
[data-theme="lightmodern"] .nk-tabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nk-tab,
[data-theme="lightmodern"] .nk-tab {
    color: rgba(0, 0, 0, 0.6);
    font-weight: 500;
}

[data-theme="light"] .nk-tab:hover,
[data-theme="lightmodern"] .nk-tab:hover {
    color: rgba(0, 0, 0, 0.85);
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .nk-tab.active,
[data-theme="lightmodern"] .nk-tab.active {
    color: #e67e22;
    font-weight: 600;
    background: rgba(230, 126, 34, 0.08);
    border-radius: 6px 6px 0 0;
}

[data-theme="light"] .nk-tab.active::after,
[data-theme="lightmodern"] .nk-tab.active::after {
    background: #e67e22;
}

/* Light theme: Stat cards with positive/negative values */
[data-theme="light"] .nk-stat-card:has(.nk-stat-value.positive),
[data-theme="lightmodern"] .nk-stat-card:has(.nk-stat-value.positive) {
    background: rgba(52, 199, 89, 0.15);
    border-color: rgba(52, 199, 89, 0.3);
}

[data-theme="light"] .nk-stat-card:has(.nk-stat-value.positive) .nk-stat-value,
[data-theme="lightmodern"] .nk-stat-card:has(.nk-stat-value.positive) .nk-stat-value {
    color: #1d7a36;
}

[data-theme="light"] .nk-stat-card:has(.nk-stat-value.positive) .nk-stat-label,
[data-theme="lightmodern"] .nk-stat-card:has(.nk-stat-value.positive) .nk-stat-label {
    color: #2a8c45;
}

[data-theme="light"] .nk-stat-card:has(.nk-stat-value.negative),
[data-theme="lightmodern"] .nk-stat-card:has(.nk-stat-value.negative) {
    background: rgba(255, 59, 48, 0.12);
    border-color: rgba(255, 59, 48, 0.3);
}

[data-theme="light"] .nk-stat-card:has(.nk-stat-value.negative) .nk-stat-value,
[data-theme="lightmodern"] .nk-stat-card:has(.nk-stat-value.negative) .nk-stat-value {
    color: #c0392b;
}

[data-theme="light"] .nk-stat-card:has(.nk-stat-value.negative) .nk-stat-label,
[data-theme="lightmodern"] .nk-stat-card:has(.nk-stat-value.negative) .nk-stat-label {
    color: #d14836;
}

/* =============================================================================
   BELEG UNIT ASSIGNMENT MODAL
   ============================================================================= */

/* Assignment Type Toggle */
.assignment-type-toggle {
    display: flex;
    gap: var(--space-md, 1rem);
}

.assignment-type-option {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm, 0.5rem);
    padding: var(--space-md, 1rem);
    background: var(--glass-primary);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md, 12px);
    cursor: pointer;
    transition: all 0.2s ease;
}

.assignment-type-option:hover {
    background: var(--glass-hover);
}

.assignment-type-option:has(input:checked) {
    border-color: var(--ios-system-orange);
    background: rgba(var(--ios-orange-rgb, 255, 149, 0), 0.08);
}

.assignment-type-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--ios-system-orange);
    cursor: pointer;
}

.assignment-type-label {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 0.25rem);
}

.assignment-type-label strong {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.assignment-type-label small {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* Assignment Sections */
.assignment-section.hidden {
    display: none;
}

/* Unit Checklist */
.unit-checklist {
    max-height: 200px;
    padding: var(--space-sm, 0.5rem);
}

.unit-check-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm, 8px);
    margin-bottom: var(--space-xs, 0.25rem);
    cursor: pointer;
    transition: all 0.2s ease;
}

.unit-check-item:hover {
    background: var(--glass-hover);
}

.unit-check-item:has(input:checked) {
    border-color: var(--ios-system-orange);
    background: rgba(var(--ios-orange-rgb, 255, 149, 0), 0.08);
}

.unit-check-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ios-system-orange);
    cursor: pointer;
}

.unit-check-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unit-check-label {
    font-weight: 500;
    color: var(--text-primary);
}

.unit-check-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Preview Table Total Row */
.preview-total-row {
    background: var(--glass-hover);
}

.preview-total-row td {
    border-top: 2px solid var(--glass-border);
    font-weight: 600;
}

/* Actions Column */
.col-actions {
    width: 50px;
    text-align: center;
}

.nebenkosten-excel-table th.col-actions,
.nebenkosten-excel-table td.col-actions {
    width: 50px;
    padding: var(--space-xs, 0.25rem);
}

/* Edit Button in Entry Rows */
.entry-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.entry-row:hover .entry-edit-btn {
    opacity: 1;
}

.entry-edit-btn:hover {
    background: var(--glass-hover);
    color: var(--ios-system-orange);
}

.entry-edit-btn svg {
    width: 16px;
    height: 16px;
}

/* Category row - hide edit button */
.category-row .col-actions {
    visibility: hidden;
}

/* Responsive for assignment modal */
@media (max-width: 48em) {
    .assignment-type-toggle {
        flex-direction: column;
    }

    .unit-checklist {
        max-height: 150px;
    }
}

/**
 * COEUS DESIGN SYSTEM - NOTIFICATION PREFERENCES COMPONENT
 *
 * PURPOSE:
 * Comprehensive notification preferences UI with glassmorphism effects
 * - Master toggle with animated state indicator
 * - Category-based accordion sections
 * - Type-specific toggle switches
 * - Priority indicators with semantic colors
 * - Theme-responsive across all 5 COEUS themes
 *
 * DESIGN AESTHETIC:
 * Refined industrial control panel - precision toggles with purposeful spacing
 * Orange accent lighting on active states (consistent with COEUS glass system)
 * Hierarchical visual structure: categories > types > controls
 *
 * FEATURES:
 * - Master notification toggle with pulse animation
 * - Collapsible category sections
 * - Custom toggle switches with smooth transitions
 * - Priority badges (low/normal/high/urgent)
 * - Icon integration with Radix icons
 * - Responsive layout for mobile/tablet/desktop
 * - NO INLINE STYLES (utility classes only)
 *
 * CSS SPECIFICITY:
 * Uses BEM-style naming with .notif-prefs- prefix
 * Theme-specific overrides via [data-theme] selectors
 *
 * DEPENDENCIES: themes-v2.css, glass-system-v2.css, variables-v2.css
 * VERSION: 1.0.0
 * CREATED: 2026-01-21
 */

/* ============================================ */
/*         NOTIFICATION PREFERENCES SECTION    */
/* ============================================ */

.notif-prefs-section {
    position: relative;
}

.notif-prefs-section .section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-6);
    color: var(--text-primary);
}

.notif-prefs-section .section-title .radix-icon {
    font-size: 1.5rem;
    color: var(--ios-system-orange);
}

.notif-prefs-section .section-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-6);
    line-height: 1.6;
}

/* ============================================ */
/*         MASTER TOGGLE CONTROL               */
/* ============================================ */

.notif-prefs-master {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-5);
    background: var(--glass-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-6);
    transition: all 0.3s ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

.notif-prefs-master:hover {
    border-color: var(--glass-border-hover);
}

.notif-prefs-master-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
}

.notif-prefs-master-label {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.notif-prefs-master-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

/* Status indicator dot with pulse animation */
.notif-prefs-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ios-system-red);
    transition: background 0.3s ease;
}

.notif-prefs-status-dot.active {
    background: var(--ios-system-green);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(52, 199, 89, 0);
    }
}

/* ============================================ */
/*         CUSTOM TOGGLE SWITCH                */
/* ============================================ */

.notif-prefs-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.notif-prefs-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.notif-prefs-toggle-track {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-prefs-toggle-track::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: var(--text-tertiary);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.notif-prefs-toggle input:checked + .notif-prefs-toggle-track {
    background: var(--ios-system-green);
    border-color: var(--ios-system-green);
}

.notif-prefs-toggle input:checked + .notif-prefs-toggle-track::before {
    transform: translateX(24px);
    background: white;
}

.notif-prefs-toggle input:focus-visible + .notif-prefs-toggle-track {
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.3);
}

/* Disabled state */
.notif-prefs-toggle input:disabled + .notif-prefs-toggle-track {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================ */
/*         CATEGORY ACCORDION SECTIONS         */
/* ============================================ */

.notif-prefs-categories {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
}

.notif-prefs-category {
    background: var(--glass-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.notif-prefs-category:hover {
    border-color: var(--glass-border-hover);
}

.notif-prefs-category.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Category header - clickable to toggle */
.notif-prefs-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-4);
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
}

.notif-prefs-category-header:hover {
    background: var(--glass-hover);
}

.notif-prefs-category-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.notif-prefs-category-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-secondary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.notif-prefs-category-header:hover .notif-prefs-category-icon {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

.notif-prefs-category-name {
    font-weight: 600;
    color: var(--text-primary);
}

.notif-prefs-category-count {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-left: var(--spacing-2);
}

.notif-prefs-category-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

/* Chevron indicator for expand/collapse */
.notif-prefs-category-chevron {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: transform 0.3s ease;
}

.notif-prefs-category.expanded .notif-prefs-category-chevron {
    transform: rotate(180deg);
}

/* Category content - type list */
.notif-prefs-category-content {
    display: none;
    border-top: 1px solid var(--glass-border);
    background: rgba(var(--theme-glass-rgb), 0.03);
}

.notif-prefs-category.expanded .notif-prefs-category-content {
    display: block;
    animation: accordionSlide 0.3s ease;
}

@keyframes accordionSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/*         TYPE-SPECIFIC TOGGLE ITEMS          */
/* ============================================ */

.notif-prefs-type-list {
    padding: var(--spacing-2);
}

.notif-prefs-type-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-3) var(--spacing-4);
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.notif-prefs-type-item:hover {
    background: var(--glass-hover);
}

.notif-prefs-type-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    flex: 1;
    min-width: 0;
}

.notif-prefs-type-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.notif-prefs-type-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.notif-prefs-type-name {
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-prefs-type-description {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================ */
/*         PRIORITY BADGES                     */
/* ============================================ */

.notif-prefs-priority {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: var(--spacing-2);
    flex-shrink: 0;
}

.notif-prefs-priority.low {
    background: rgba(var(--ios-blue-rgb), 0.15);
    color: var(--ios-system-orange);
}

.notif-prefs-priority.normal {
    background: rgba(var(--ios-green-rgb), 0.15);
    color: var(--ios-system-green);
}

.notif-prefs-priority.high {
    background: rgba(var(--ios-orange-rgb), 0.15);
    color: var(--ios-system-orange);
}

.notif-prefs-priority.urgent {
    background: rgba(var(--ios-red-rgb), 0.15);
    color: var(--ios-system-red);
    animation: urgentPulse 1.5s ease-in-out infinite;
}

@keyframes urgentPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ============================================ */
/*         SMALLER TOGGLE FOR TYPE ITEMS       */
/* ============================================ */

.notif-prefs-toggle-sm {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.notif-prefs-toggle-sm input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.notif-prefs-toggle-sm .notif-prefs-toggle-track {
    height: 22px;
    border-radius: 11px;
}

.notif-prefs-toggle-sm .notif-prefs-toggle-track::before {
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
}

.notif-prefs-toggle-sm input:checked + .notif-prefs-toggle-track::before {
    transform: translateX(18px);
}

/* ============================================ */
/*         LOADING & EMPTY STATES              */
/* ============================================ */

.notif-prefs-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-10);
    color: var(--text-secondary);
    gap: var(--spacing-4);
}

.notif-prefs-loading .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.notif-prefs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-10);
    color: var(--text-tertiary);
    text-align: center;
    gap: var(--spacing-3);
}

.notif-prefs-empty-icon {
    font-size: 3rem;
    opacity: 0.5;
}

/* ============================================ */
/*         MODAL VARIANT                       */
/* ============================================ */

.notif-prefs-modal {
    --modal-max-width: 32em;
}

.notif-prefs-modal .notif-prefs-categories {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: var(--spacing-2);
}

/* Custom scrollbar for modal */
.notif-prefs-modal .notif-prefs-categories::-webkit-scrollbar {
    width: 6px;
}

.notif-prefs-modal .notif-prefs-categories::-webkit-scrollbar-track {
    background: transparent;
}

.notif-prefs-modal .notif-prefs-categories::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.notif-prefs-modal .notif-prefs-categories::-webkit-scrollbar-thumb:hover {
    background: var(--glass-border-hover);
}

/* ============================================ */
/*         QUICK ACTIONS BAR                   */
/* ============================================ */

.notif-prefs-actions {
    display: flex;
    gap: var(--spacing-3);
    padding-top: var(--spacing-5);
    border-top: 1px solid var(--glass-border);
    margin-top: var(--spacing-5);
}

.notif-prefs-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    padding: var(--spacing-3);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notif-prefs-action-btn:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border-hover);
}

.notif-prefs-action-btn.primary {
    background: linear-gradient(135deg, var(--ios-system-orange), #fb923c);
    border-color: transparent;
    color: var(--button-text-on-color);
}

.notif-prefs-action-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.35);
    transform: translateY(-1px);
}

/* ============================================ */
/*         TOAST NOTIFICATION PREVIEW          */
/* ============================================ */

.notif-prefs-preview {
    position: relative;
    padding: var(--spacing-4);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--ios-system-orange);
    border-radius: var(--radius-sm);
    margin-top: var(--spacing-4);
}

.notif-prefs-preview-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-2);
}

.notif-prefs-preview-content {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-3);
}

.notif-prefs-preview-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-primary);
    border-radius: var(--radius-sm);
    color: var(--ios-system-orange);
    flex-shrink: 0;
}

.notif-prefs-preview-text {
    flex: 1;
}

.notif-prefs-preview-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notif-prefs-preview-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================ */
/*         RESPONSIVE ADJUSTMENTS              */
/* ============================================ */

@media (max-width: 48em) {
    .notif-prefs-master {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-4);
    }

    .notif-prefs-toggle {
        align-self: flex-end;
    }

    .notif-prefs-category-header {
        padding: var(--spacing-3);
    }

    .notif-prefs-category-icon {
        width: 32px;
        height: 32px;
    }

    .notif-prefs-type-item {
        padding: var(--spacing-3);
    }

    .notif-prefs-type-description {
        display: none;
    }

    .notif-prefs-actions {
        flex-direction: column;
    }

    .notif-prefs-modal {
        --modal-max-width: calc(100vw - 2rem);
    }

    .notif-prefs-modal .notif-prefs-categories {
        max-height: 50vh;
    }
}

@media (max-width: 30em) {
    .notif-prefs-category-count {
        display: none;
    }

    .notif-prefs-priority {
        display: none;
    }

    .notif-prefs-type-icon {
        display: none;
    }
}

/* ============================================ */
/*         THEME-SPECIFIC ADJUSTMENTS          */
/* ============================================ */

/* Light themes - subtle adjustments */
[data-theme="light"] .notif-prefs-category,
[data-theme="lightmodern"] .notif-prefs-category {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Dark themes - enhanced glass effect */
[data-theme="dark"] .notif-prefs-category,
[data-theme="darkart"] .notif-prefs-category,
[data-theme="darkmodern"] .notif-prefs-category {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Dark modern - cooler tone */
[data-theme="darkmodern"] .notif-prefs-category-header:hover .notif-prefs-category-icon {
    background: var(--accent-primary);
}

/* ============================================ */
/*         ACCESSIBILITY                       */
/* ============================================ */

/* Focus states */
.notif-prefs-toggle input:focus-visible + .notif-prefs-toggle-track,
.notif-prefs-category-header:focus-visible,
.notif-prefs-action-btn:focus-visible {
    outline: 2px solid var(--ios-system-orange);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .notif-prefs-status-dot.active,
    .notif-prefs-priority.urgent {
        animation: none;
    }

    .notif-prefs-category.expanded .notif-prefs-category-content {
        animation: none;
    }

    .notif-prefs-toggle-track,
    .notif-prefs-toggle-track::before,
    .notif-prefs-category-chevron {
        transition-duration: 0.1s;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .notif-prefs-category {
        border-width: 2px;
    }

    .notif-prefs-toggle-track {
        border-width: 2px;
    }

    .notif-prefs-priority {
        border: 1px solid currentColor;
    }
}

/**
 * Preview Mode Banner Styles
 *
 * Fixed banner shown at top of all pages during admin preview mode.
 * Features: role badge, countdown timer, exit button
 * Theme-aware for all 5 themes
 */

/* ============================================
   PREVIEW MODE BANNER
   ============================================ */

.preview-mode-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 1.5em;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.95) 0%, rgba(59, 130, 246, 0.95) 100%);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    color: #ffffff;
    font-family: var(--font-sans);
    animation: previewBannerSlideIn 0.3s ease-out;
}

@keyframes previewBannerSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Left section: Badge + Role */
.preview-banner-left {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

.preview-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.25em 0.6em;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.preview-banner-badge .radix-icon {
    width: 1em;
    height: 1em;
}

.preview-banner-role {
    font-size: 0.875em;
    font-weight: 600;
}

/* Center section: Timer */
.preview-banner-center {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.875em;
}

.preview-banner-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.25em 0.6em;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.preview-banner-timer .radix-icon {
    width: 1em;
    height: 1em;
}

/* Warning state: < 5 minutes remaining */
.preview-banner-timer.warning {
    background: rgba(245, 158, 11, 0.9);
    animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Critical state: < 1 minute remaining */
.preview-banner-timer.critical {
    background: rgba(239, 68, 68, 0.9);
    animation: timerPulse 0.5s ease-in-out infinite;
}

/* Right section: Exit button */
.preview-banner-right {
    display: flex;
    align-items: center;
}

.preview-exit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.4em 0.8em;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-exit-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--text-tertiary);
    transform: translateY(-1px);
}

.preview-exit-btn:active {
    transform: translateY(0);
}

.preview-exit-btn .radix-icon {
    width: 1em;
    height: 1em;
}

/* ============================================
   PREVIEW SECTION IN USER PROFILE
   ============================================ */

.onboarding-preview-section {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.onboarding-preview-header {
    margin-bottom: var(--spacing-lg);
}

.onboarding-preview-title {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin: 0 0 0.5em 0;
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
}

.onboarding-preview-title .radix-icon {
    width: 1.25em;
    height: 1.25em;
    color: var(--ios-system-purple);
}

.onboarding-preview-subtitle {
    margin: 0;
    font-size: 0.875em;
    color: var(--text-secondary);
}

/* Role Cards Grid */
.preview-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12em, 1fr));
    gap: var(--spacing-md);
}

button.preview-role-card {
    /* Reset button defaults - important for browser overrides */
    all: unset;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75em;
    padding: var(--spacing-lg, 1.5rem);
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: var(--radius-md, 12px);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    color: var(--text-primary, #f0f0f0);
}

button.preview-role-card:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

button.preview-role-card:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

button.preview-role-card:active {
    transform: translateY(0);
}

button.preview-role-card .role-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3em;
    height: 3em;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border-radius: 50%;
}

button.preview-role-card .role-icon .radix-icon {
    width: 1.5em;
    height: 1.5em;
    color: var(--ios-system-purple);
}

.preview-role-title {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-role-desc {
    font-size: 0.75em;
    color: var(--text-secondary);
    line-height: 1.4;
}

.launch-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    margin-top: 0.5em;
    font-size: 0.75em;
    color: var(--ios-system-purple);
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.2s ease;
}

button.preview-role-card:hover .launch-hint {
    opacity: 1;
    transform: translateY(0);
}

.launch-hint .radix-icon {
    width: 1em;
    height: 1em;
}

/* ============================================
   ACTIVE SESSION RESUME MODAL
   ============================================ */

.preview-resume-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.preview-resume-modal .modal-content {
    max-width: 28em;
    width: calc(100% - 2em);
    text-align: center;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.preview-resume-modal .modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4em;
    height: 4em;
    margin: 0 auto var(--spacing-md);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(239, 68, 68, 0.2) 100%);
    border-radius: 50%;
}

.preview-resume-modal .modal-icon .radix-icon {
    width: 2em;
    height: 2em;
    color: var(--ios-system-orange);
}

.preview-resume-modal h3 {
    margin: 0 0 var(--spacing-sm);
    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-resume-modal .modal-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-top: var(--spacing-lg);
}

.preview-resume-modal .glass-button-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--ios-system-red);
}

.preview-resume-modal .glass-button-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* ============================================
   BODY OFFSET WHEN BANNER IS SHOWN
   ============================================ */

body.preview-mode-active {
    padding-top: 3em;
}

body.preview-mode-active .main-content {
    min-height: calc(100vh - 3em);
}

/* ============================================
   THEME VARIATIONS
   ============================================ */

/* Dark theme */
body[data-theme="dark"] .preview-mode-banner {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.9) 0%, rgba(59, 130, 246, 0.9) 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body[data-theme="dark"] .onboarding-preview-section {
    background: var(--glass-primary);
    border-color: var(--glass-border);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 48em) {
    .preview-mode-banner {
        flex-wrap: wrap;
        gap: 0.5em;
        padding: 0.5em 1em;
    }

    .preview-banner-center {
        order: 3;
        width: 100%;
        justify-content: center;
        font-size: 0.8em;
    }

    .preview-role-grid {
        grid-template-columns: 1fr;
    }

    .preview-resume-modal .modal-actions {
        flex-direction: column;
    }
}

/* ============================================
   DEMO MODE BANNER (Simplified Tour Mode)
   ============================================ */

.demo-mode-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 1.5em;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.95) 0%, rgba(59, 130, 246, 0.95) 100%);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    color: #ffffff;
    font-family: var(--font-sans);
    animation: demoBannerSlideIn 0.3s ease-out;
}

@keyframes demoBannerSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Left section: Badge + Role + Progress */
.demo-banner-left {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

.demo-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.25em 0.6em;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.demo-banner-badge .radix-icon {
    width: 1em;
    height: 1em;
}

.demo-banner-role {
    font-size: 0.875em;
    font-weight: 600;
}

.demo-banner-progress {
    font-size: 0.75em;
    opacity: 0.8;
}

/* Center section: Step dots */
.demo-banner-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-steps-dots {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.demo-step-dot {
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.demo-step-dot.completed {
    background: rgba(255, 255, 255, 0.8);
}

.demo-step-dot.active {
    width: 0.75em;
    height: 0.75em;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Right section: Navigation buttons */
.demo-banner-right {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.demo-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
    padding: 0.4em 0.8em;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--text-tertiary);
    transform: translateY(-1px);
}

.demo-nav-btn:active {
    transform: translateY(0);
}

.demo-nav-btn .radix-icon {
    width: 1em;
    height: 1em;
}

.demo-nav-btn-primary {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--text-tertiary);
}

.demo-nav-btn-primary:hover {
    background: rgba(255, 255, 255, 0.35);
}

.demo-exit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    padding: 0;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5em;
}

.demo-exit-btn:hover {
    background: rgba(239, 68, 68, 0.4);
    border-color: rgba(239, 68, 68, 0.6);
    transform: scale(1.05);
}

.demo-exit-btn .radix-icon {
    width: 1em;
    height: 1em;
}

/* Body offset for demo mode */
body.demo-mode-active {
    padding-top: 3em;
}

body.demo-mode-active .main-content {
    min-height: calc(100vh - 3em);
}

/* ============================================
   DEMO START CONFIRMATION MODAL
   ============================================ */

.demo-start-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: demoModalFadeIn 0.2s ease-out;
}

@keyframes demoModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.demo-start-modal {
    max-width: 28em;
    width: calc(100% - 2em);
    padding: var(--spacing-xl, 2rem);
    text-align: center;
    animation: demoModalSlideUp 0.3s ease-out;
}

@keyframes demoModalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.demo-start-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4em;
    height: 4em;
    margin: 0 auto var(--spacing-md, 1rem);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border-radius: 50%;
}

.demo-start-icon .radix-icon {
    width: 2em;
    height: 2em;
    color: var(--ios-system-purple, #8b5cf6);
}

.demo-start-modal h3 {
    margin: 0 0 var(--spacing-sm, 0.5rem);
    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-primary);
}

.demo-start-desc {
    margin: 0 0 var(--spacing-lg, 1.5rem);
    font-size: 0.875em;
    color: var(--text-secondary);
    line-height: 1.5;
}

.demo-start-steps {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin-bottom: var(--spacing-lg, 1.5rem);
    padding: var(--spacing-md, 1rem);
    background: var(--glass-primary, rgba(255, 255, 255, 0.05));
    border-radius: var(--radius-md, 12px);
}

.demo-start-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
}

.demo-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%);
    border-radius: 50%;
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
}

.demo-step-text {
    font-size: 0.75em;
    color: var(--text-secondary);
}

.demo-start-actions {
    display: flex;
    gap: var(--spacing-sm, 0.5rem);
    justify-content: center;
}

.demo-start-btn-primary {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%);
    border-color: rgba(139, 92, 246, 0.5);
}

.demo-start-btn-primary:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(59, 130, 246, 0.4) 100%);
}

/* ============================================
   DEMO COMPLETION MODAL
   ============================================ */

.demo-completion-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    animation: demoModalFadeIn 0.2s ease-out;
}

.demo-completion-modal {
    max-width: 32em;
    width: calc(100% - 2em);
    padding: var(--spacing-xl, 2rem);
    text-align: center;
    animation: demoModalSlideUp 0.3s ease-out;
}

.demo-completion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5em;
    height: 5em;
    margin: 0 auto var(--spacing-lg, 1.5rem);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
    border-radius: 50%;
}

.demo-completion-icon .radix-icon {
    width: 2.5em;
    height: 2.5em;
    color: var(--ios-system-green, #34c759);
}

.demo-completion-title {
    margin: 0 0 var(--spacing-sm, 0.5rem);
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
}

.demo-completion-subtitle {
    margin: 0 0 var(--spacing-lg, 1.5rem);
    font-size: 0.95em;
    color: var(--text-secondary);
}

.demo-completion-features {
    text-align: left;
    padding: var(--spacing-md, 1rem);
    background: var(--glass-primary, rgba(255, 255, 255, 0.05));
    border-radius: var(--radius-md, 12px);
    margin-bottom: var(--spacing-lg, 1.5rem);
}

.demo-completion-features h4 {
    margin: 0 0 var(--spacing-sm, 0.5rem);
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
}

.demo-completion-features ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.demo-completion-features li {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.35em 0;
    font-size: 0.875em;
    color: var(--text-secondary);
}

.demo-completion-features li .radix-icon {
    width: 1em;
    height: 1em;
    color: var(--ios-system-green, #34c759);
    flex-shrink: 0;
}

.demo-completion-actions {
    display: flex;
    gap: var(--spacing-sm, 0.5rem);
    justify-content: center;
}

.demo-completion-btn-primary {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%);
    border-color: rgba(139, 92, 246, 0.5);
}

.demo-completion-btn-primary:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(59, 130, 246, 0.4) 100%);
}

.demo-completion-btn-secondary {
    background: var(--glass-primary, rgba(255, 255, 255, 0.05));
}

/* ============================================
   DEMO ROLE PICKER
   ============================================ */

.demo-role-picker {
    max-width: 20em;
    width: calc(100% - 2em);
    padding: var(--spacing-xl, 2rem);
    text-align: center;
    animation: demoModalSlideUp 0.3s ease-out;
}

.demo-role-picker h3 {
    margin: 0 0 var(--spacing-lg, 1.5rem);
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
}

.demo-role-picker-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 0.5rem);
    margin-bottom: var(--spacing-lg, 1.5rem);
}

.demo-role-picker-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75em;
    padding: var(--spacing-md, 1rem);
    background: var(--glass-primary, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: var(--radius-md, 12px);
    color: var(--text-primary);
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-role-picker-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.demo-role-picker-btn .radix-icon {
    width: 1.25em;
    height: 1.25em;
    color: var(--ios-system-purple, #8b5cf6);
}

.demo-role-picker-cancel {
    width: 100%;
}

/* ============================================
   DEMO PRICING OVERLAY
   ============================================ */

.demo-pricing-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.demo-pricing-card {
    max-width: 28em;
    width: calc(100% - 2em);
    padding: var(--spacing-xl, 2rem);
    text-align: center;
}

.demo-pricing-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4em;
    height: 4em;
    margin: 0 auto var(--spacing-md, 1rem);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-radius: 50%;
}

.demo-pricing-icon .radix-icon {
    width: 2em;
    height: 2em;
    color: var(--ios-system-orange);
}

.demo-pricing-card h3 {
    margin: 0 0 var(--spacing-sm, 0.5rem);
    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-primary);
}

.demo-pricing-card p {
    margin: 0 0 var(--spacing-lg, 1.5rem);
    font-size: 0.875em;
    color: var(--text-secondary);
    line-height: 1.5;
}

.demo-pricing-continue {
    width: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%);
    border-color: rgba(139, 92, 246, 0.5);
}

.demo-pricing-continue:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(59, 130, 246, 0.4) 100%);
}

/* ============================================
   RESPONSIVE DEMO MODE
   ============================================ */

@media (max-width: 48em) {
    .demo-mode-banner {
        flex-wrap: wrap;
        gap: 0.5em;
        padding: 0.5em 1em;
    }

    .demo-banner-center {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .demo-banner-progress {
        display: none;
    }

    .demo-start-steps {
        flex-direction: column;
        gap: 0.5em;
    }

    .demo-start-step {
        flex-direction: row;
        gap: 1em;
    }

    .demo-completion-actions,
    .demo-start-actions {
        flex-direction: column;
    }

    .demo-completion-actions button,
    .demo-start-actions button {
        width: 100%;
    }
}

/**
 * COEUS DESIGN SYSTEM - PROJECT CHAT COMPONENT
 *
 * PURPOSE:
 * Multi-role project chat widget styles for vendor dashboard.
 * Floating chat button + sliding panel with conversation list and messages.
 *
 * FEATURES:
 * - Floating action button (bottom-right)
 * - Slide-in chat panel with conversation list
 * - Message bubbles with translation display
 * - Subscription gate overlay for unsubscribed employees
 * - Theme-responsive via CSS variables
 *
 * DEPENDENCIES: variables-v2.css, themes-v2.css, glass-system-v2.css
 * CREATED: 2026-02-09
 */

/* ===============================================
   FLOATING CHAT BUTTON
   =============================================== */

.project-chat-fab {
    position: fixed;
    bottom: 1.5em;
    right: 1.5em;
    width: 3.5em;
    height: 3.5em;
    border-radius: 50%;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.25em 1em rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-chat-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 0.375em 1.5em rgba(0, 0, 0, 0.3);
}

.project-chat-fab .radix-icon {
    width: 1.5em;
    height: 1.5em;
}

.project-chat-fab-badge {
    position: absolute;
    top: -0.25em;
    right: -0.25em;
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
    font-size: 0.6875em;
    font-weight: 600;
    min-width: 1.25em;
    height: 1.25em;
    border-radius: 0.625em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25em;
}

/* ===============================================
   CHAT PANEL
   =============================================== */

.project-chat-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 25em;
    height: 37.5em;
    max-height: calc(100vh - 5em);
    background: var(--glass-thick, rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(2.5em);
    -webkit-backdrop-filter: blur(2.5em);
    border: 0.0625em solid var(--glass-border);
    border-radius: 1em 1em 0 0;
    box-shadow: 0 -0.5em 2.5em rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.project-chat-panel.open {
    transform: translateY(0);
}

/* ===============================================
   PANEL HEADER
   =============================================== */

.project-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75em 1em;
    border-bottom: 0.0625em solid var(--glass-border);
    min-height: 3em;
}

.project-chat-header-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.project-chat-header-actions {
    display: flex;
    gap: 0.5em;
}

.project-chat-header-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25em;
    border-radius: 0.375em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-chat-header-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* ===============================================
   CONVERSATION LIST
   =============================================== */

.project-chat-conversations {
    flex: 1;
    overflow-y: auto;
    padding: 0.5em;
}

.project-chat-conv-item {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.625em 0.75em;
    border-radius: 0.5em;
    cursor: pointer;
    transition: background 0.15s ease;
}

.project-chat-conv-item:hover {
    background: var(--glass-hover);
}

.project-chat-conv-item.active {
    background: var(--glass-secondary);
}

.project-chat-conv-info {
    flex: 1;
    min-width: 0;
}

.project-chat-conv-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-chat-conv-preview {
    font-size: 0.75em;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.125em;
}

.project-chat-conv-badge {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-size: 0.6875em;
    font-weight: 600;
    min-width: 1.25em;
    height: 1.25em;
    border-radius: 0.625em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25em;
}

.project-chat-conv-time {
    font-size: 0.6875em;
    color: var(--text-quaternary);
    white-space: nowrap;
}

.project-chat-empty {
    padding: 2em;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875em;
}

/* ===============================================
   MESSAGES VIEW
   =============================================== */

.project-chat-messages-view {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.project-chat-messages-view.active {
    display: flex;
}

.project-chat-messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75em;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

/* ===============================================
   MESSAGE BUBBLES
   =============================================== */

.project-chat-msg {
    max-width: 85%;
    padding: 0.5em 0.75em;
    border-radius: 0.75em;
    word-break: break-word;
}

.project-chat-msg-self {
    align-self: flex-end;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border-bottom-right-radius: 0.25em;
}

.project-chat-msg-other {
    align-self: flex-start;
    background: var(--glass-secondary);
    color: var(--text-primary);
    border-bottom-left-radius: 0.25em;
}

.project-chat-msg-system {
    align-self: center;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.75em;
    font-style: italic;
    text-align: center;
    padding: 0.25em 0.5em;
}

.project-chat-msg-sender {
    font-size: 0.6875em;
    font-weight: 500;
    color: var(--ios-system-orange);
    margin-bottom: 0.125em;
}

.project-chat-msg-self .project-chat-msg-sender {
    color: var(--text-secondary);
}

.project-chat-msg-translated {
    font-size: 1em;
    color: var(--text-primary);
    line-height: 1.4;
}

.project-chat-msg-self .project-chat-msg-translated {
    color: var(--button-text-on-color);
}

.project-chat-msg-original {
    font-size: 0.8125em;
    font-style: italic;
    color: var(--text-tertiary);
    border-top: 0.0625em solid var(--glass-border);
    margin-top: 0.375em;
    padding-top: 0.375em;
    line-height: 1.3;
}

.project-chat-msg-self .project-chat-msg-original {
    color: var(--text-tertiary);
    border-top-color: var(--text-quaternary);
}

.project-chat-msg-time {
    font-size: 0.625em;
    color: var(--text-quaternary);
    text-align: right;
    margin-top: 0.25em;
}

.project-chat-msg-self .project-chat-msg-time {
    color: var(--text-tertiary);
}

/* ===============================================
   INPUT AREA
   =============================================== */

.project-chat-input-area {
    display: flex;
    gap: 0.5em;
    padding: 0.625em 0.75em;
    border-top: 0.0625em solid var(--glass-border);
    align-items: flex-end;
}

.project-chat-input {
    flex: 1;
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 1em;
    padding: 0.5em 0.875em;
    color: var(--text-primary);
    font-size: 0.875em;
    resize: none;
    max-height: 5em;
    overflow-y: auto;
    line-height: 1.4;
    font-family: inherit;
}

.project-chat-input::placeholder {
    color: var(--text-tertiary);
}

.project-chat-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

.project-chat-send-btn {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border: none;
    border-radius: 50%;
    width: 2.25em;
    height: 2.25em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}

.project-chat-send-btn:hover {
    opacity: 0.85;
}

.project-chat-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Quote button in input area */
.project-chat-quote-btn {
    background: var(--sunset-warm, #F26419);
    color: var(--button-text-on-color);
    border: none;
    border-radius: 50%;
    width: 2.25em;
    height: 2.25em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.project-chat-quote-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* Quote system message card */
.project-chat-quote-card {
    background: rgba(var(--sunset-amber-rgb, 255, 174, 66), 0.08);
    border: 0.0625em solid rgba(var(--sunset-rgb, 242, 100, 25), 0.2);
    border-left: 0.1875em solid var(--sunset-warm, #F26419);
    border-radius: 0.625em;
    padding: 0.625em 0.75em;
    margin: 0.375em 0;
}

.project-chat-quote-card-header {
    display: flex;
    align-items: center;
    gap: 0.375em;
    margin-bottom: 0.25em;
}

.project-chat-quote-card-icon {
    width: 1em;
    height: 1em;
    color: var(--sunset-warm, #F26419);
}

.project-chat-quote-card-label {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--sunset-deep, #E55100);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.project-chat-quote-card-total {
    font-size: 1.0625em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.125em;
}

.project-chat-quote-card-meta {
    font-size: 0.75em;
    color: var(--text-tertiary);
}

.project-chat-quote-card-dl {
    margin-top: 0.375em;
    padding: 0.25em 0.625em;
    background: var(--glass-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.375em;
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.project-chat-quote-card-dl:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* ===============================================
   SUBSCRIPTION GATE
   =============================================== */

.project-chat-subscription-gate {
    position: absolute;
    inset: 0;
    background: var(--glass-thick, rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(0.625em);
    -webkit-backdrop-filter: blur(0.625em);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2em;
    text-align: center;
    z-index: 10;
    border-radius: 1em;
}

.project-chat-gate-icon {
    font-size: 2.5em;
    color: var(--text-tertiary);
    margin-bottom: 0.5em;
}

.project-chat-gate-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.0625em;
    margin-bottom: 0.5em;
}

.project-chat-gate-text {
    color: var(--text-secondary);
    font-size: 0.875em;
    margin-bottom: 1em;
    line-height: 1.4;
}

/* ===============================================
   NEW CONVERSATION MODAL
   =============================================== */

.project-chat-new-conv {
    padding: 1em;
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

.project-chat-new-conv-input {
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.5em 0.75em;
    color: var(--text-primary);
    font-size: 0.875em;
    font-family: inherit;
}

.project-chat-new-conv-input::placeholder {
    color: var(--text-tertiary);
}

.project-chat-new-conv-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

.project-chat-new-conv-actions {
    display: flex;
    gap: 0.5em;
    justify-content: flex-end;
}

/* ===============================================
   MEMBERS LIST
   =============================================== */

.project-chat-members {
    padding: 0.5em;
}

.project-chat-member-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.375em 0.5em;
    border-radius: 0.375em;
}

.project-chat-member-name {
    flex: 1;
    font-size: 0.8125em;
    color: var(--text-primary);
}

.project-chat-member-role {
    font-size: 0.6875em;
    color: var(--text-tertiary);
    background: var(--glass-primary);
    padding: 0.125em 0.5em;
    border-radius: 0.75em;
}

/* ===============================================
   RESPONSIVE
   =============================================== */

@media (max-width: 30em) {
    .project-chat-panel {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

/**
 * COEUS Permissions Modal - Unified Permissions Management
 *
 * PURPOSE: Modal for managing PM (60+ categories) + Vendor (11 categories) permissions
 * Used by: settings-team.html via permissions-modal.js
 *
 * DEPENDENCIES:
 * - components/modals.css (base modal patterns)
 * - core/variables-v2.css (theme vars)
 */

/* ===== Modal Overlay ===== */
.permissions-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(0.25em);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5em;
}

.permissions-modal-overlay.open {
    display: flex;
}

/* ===== Modal Container ===== */
.permissions-modal-container {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 1em;
    width: 100%;
    max-width: 40em;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(2.5em);
    -webkit-backdrop-filter: blur(2.5em);
    animation: permModalSlideUp 0.3s ease;
}

@keyframes permModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(1em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Modal Header ===== */
.permissions-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25em 1.5em;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.permissions-modal-header-info {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

.permissions-modal-avatar {
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1em;
    flex-shrink: 0;
}

.permissions-modal-header-text h3 {
    font-size: 1.0625em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.permissions-modal-header-text p {
    font-size: 0.8125em;
    color: var(--text-secondary);
    margin: 0;
}

.permissions-modal-close {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.375em;
    border-radius: 0.375em;
    font-size: 1.25em;
    transition: color 0.2s, background 0.2s;
}

.permissions-modal-close:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
}

/* ===== Preset Selector ===== */
.permissions-modal-preset {
    padding: 0.875em 1.5em;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.permissions-modal-preset label {
    font-size: 0.8125em;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.375em;
}

.permissions-modal-preset select {
    width: 100%;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.5em 0.75em;
    color: var(--text-primary);
    font-size: 0.9375em;
    cursor: pointer;
}

.permissions-modal-preset select:focus {
    border-color: var(--ios-system-orange);
    outline: none;
}

/* ===== Modal Body (Scrollable) ===== */
.permissions-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75em 1.5em;
}

/* ===== Accordion Categories ===== */
.permissions-category {
    border: 1px solid var(--glass-border);
    border-radius: 0.625em;
    margin-bottom: 0.5em;
    overflow: hidden;
}

.permissions-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75em 1em;
    cursor: pointer;
    background: var(--glass-primary);
    transition: background 0.2s;
}

.permissions-category-header:hover {
    background: var(--glass-hover);
}

.permissions-category-header-left {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.permissions-category-header-left .radix-icon {
    color: var(--text-secondary);
    font-size: 1em;
}

.permissions-category-header-left span {
    font-size: 0.9375em;
    font-weight: 500;
    color: var(--text-primary);
}

.permissions-category-count {
    font-size: 0.75em;
    color: var(--text-tertiary);
    background: var(--glass-secondary);
    padding: 0.125em 0.5em;
    border-radius: 1em;
}

.permissions-category-chevron {
    width: 0.875em;
    height: 0.875em;
    color: var(--text-tertiary);
    transition: transform 0.2s;
}

.permissions-category.open .permissions-category-chevron {
    transform: rotate(90deg);
}

/* ===== Category Body (Actions) ===== */
.permissions-category-body {
    display: none;
    padding: 0.625em 1em;
    border-top: 1px solid var(--glass-border);
}

.permissions-category.open .permissions-category-body {
    display: block;
}

/* ===== Permission Action Row ===== */
.permissions-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 0;
    border-bottom: 1px solid var(--glass-border);
}

.permissions-action-row:last-child {
    border-bottom: none;
}

.permissions-action-label {
    font-size: 0.875em;
    color: var(--text-primary);
}

/* ===== Toggle Switch ===== */
.permissions-toggle {
    position: relative;
    width: 2.75em;
    height: 1.625em;
    flex-shrink: 0;
}

.permissions-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.permissions-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 1em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.permissions-toggle input:checked + .permissions-toggle-track {
    background: var(--ios-system-green);
    border-color: var(--ios-system-green);
}

.permissions-toggle-track::after {
    content: '';
    position: absolute;
    width: 1.25em;
    height: 1.25em;
    border-radius: 50%;
    background: #fff;
    top: 0.125em;
    left: 0.125em;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.permissions-toggle input:checked + .permissions-toggle-track::after {
    transform: translateX(1.125em);
}

/* ===== Bulk Actions (Select All / Deselect All) ===== */
.permissions-bulk-actions {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.75em;
}

.permissions-bulk-btn {
    background: transparent;
    border: none;
    color: var(--ios-system-orange);
    cursor: pointer;
    padding: 0.25em 0.5em;
    border-radius: 0.25em;
    font-size: 1em;
    transition: background 0.2s;
}

.permissions-bulk-btn:hover {
    background: var(--glass-hover);
}

/* ===== Modal Footer ===== */
.permissions-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 1.5em;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
    gap: 0.75em;
}

.permissions-modal-footer-left {
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

.permissions-modal-footer-right {
    display: flex;
    gap: 0.5em;
}

.permissions-modal-footer .perm-btn {
    padding: 0.5em 1.25em;
    border-radius: 0.5em;
    font-size: 0.9375em;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    transition: background 0.2s;
}

.permissions-modal-footer .perm-btn:hover {
    background: var(--glass-hover);
}

.permissions-modal-footer .perm-btn-save {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border-color: var(--ios-system-orange);
}

.permissions-modal-footer .perm-btn-save:hover {
    opacity: 0.9;
}

.permissions-modal-footer .perm-btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Search Filter ===== */
.permissions-modal-search {
    padding: 0.625em 1.5em;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.permissions-modal-search input {
    width: 100%;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.5em 0.75em;
    color: var(--text-primary);
    font-size: 0.875em;
}

.permissions-modal-search input:focus {
    border-color: var(--ios-system-orange);
    outline: none;
}

.permissions-modal-search input::placeholder {
    color: var(--text-tertiary);
}

/* ===== Read-Only Permission Badges (Manager View) ===== */
.permissions-badge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    padding: 0.5em 0;
}

.permissions-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.75em;
    border-radius: 1em;
    font-size: 0.8125em;
    font-weight: 500;
}

.permissions-badge-granted {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.permissions-badge-denied {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

/* ===== Responsive ===== */
@media (max-width: 30em) {
    .permissions-modal-overlay {
        padding: 0.5em;
    }

    .permissions-modal-container {
        max-height: 95vh;
        border-radius: 0.75em;
    }

    .permissions-modal-header {
        padding: 1em;
    }

    .permissions-modal-body {
        padding: 0.5em 1em;
    }

    .permissions-modal-footer {
        padding: 0.75em 1em;
        flex-direction: column;
    }

    .permissions-modal-footer-right {
        width: 100%;
    }

    .permissions-modal-footer .perm-btn {
        flex: 1;
        text-align: center;
    }
}

/**
 * @file quote-builder.css
 * @filepath public/css/components/quote-builder.css
 * @description Shared Quote Builder modal component — used at 3 touchpoints:
 *   Ausschreibungen, Vendor Chat, Aufträge page.
 *   "Warm Swiss Precision" aesthetic with sunset orange accent palette.
 *   All classes prefixed with .qb- to avoid conflicts.
 * @created 2026-02-14
 * @updated 2026-03-02 - Added .qb-recipient-section for external client fields
 * @updated 2026-02-27 - Added SVG sizing rules for icon system, preview button style
 * @dependencies coeus-v2.css (theme variables), sunset palette from page scope
 */

/* ============================================ */
/*         OVERLAY + CONTAINER                 */
/* ============================================ */

.qb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(0.5em);
    -webkit-backdrop-filter: blur(0.5em);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 1.5em;
    /* Promote child glass-card to modal-level opacity */
    --_glass-card-bg: var(--glass-modal-bg);
    --_glass-card-blur: blur(40px);
}

.qb-overlay.open {
    display: flex;
}

/* ============================================ */
/*         MODAL                               */
/* ============================================ */

.qb-modal {
    width: 100%;
    max-width: 40em;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: var(--glass-modal-bg, var(--glass-primary));
    backdrop-filter: blur(40px) saturate(1.2);
    -webkit-backdrop-filter: blur(40px) saturate(1.2);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    overflow: hidden;
    animation: qbModalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes qbModalEnter {
    from {
        opacity: 0;
        transform: translateY(2em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accent bar */
.qb-accent {
    height: 3px;
    background: linear-gradient(90deg,
        var(--sunset-warm, #F26419),
        var(--sunset-glow, #FF8C42),
        var(--sunset-amber, #FFAE42),
        transparent);
    flex-shrink: 0;
}

/* ============================================ */
/*         HEADER                              */
/* ============================================ */

.qb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em 1.25em 0.75em;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.qb-title {
    font-family: var(--font-serif);
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.qb-close {
    width: 2em;
    height: 2em;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.qb-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.qb-close svg { width: 1em; height: 1em; }

/* ============================================ */
/*         SCROLLABLE BODY                     */
/* ============================================ */

.qb-body {
    flex: 1;
    overflow-y: auto;
    padding: 1em 1.25em;
    display: flex;
    flex-direction: column;
    gap: 1.25em;
}

/* ============================================ */
/*         SEARCH + CATEGORY CHIPS             */
/* ============================================ */

.qb-search-wrapper {
    position: relative;
}

.qb-search-icon {
    position: absolute;
    left: 0.75em;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.875em;
    pointer-events: none;
}

.qb-search-icon svg { width: 1em; height: 1em; }

.qb-search {
    width: 100%;
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qb-search::placeholder {
    color: var(--text-quaternary);
}

.qb-search:focus {
    outline: none;
    border-color: var(--sunset-warm, #F26419);
    box-shadow: 0 0 0 3px rgba(var(--sunset-rgb, 242, 100, 25), 0.15);
}

.qb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375em;
}

.qb-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25em 0.75em;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-secondary);
}

.qb-chip:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.qb-chip.active {
    background: var(--sunset-warm, #F26419);
    border-color: var(--sunset-warm, #F26419);
    color: var(--button-text-on-color);
}

/* ============================================ */
/*         INVENTORY ITEMS LIST                */
/* ============================================ */

.qb-section-label {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.375em;
}

.qb-inventory {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
    max-height: 15em;
    overflow-y: auto;
}

.qb-inv-item {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.625em 0.75em;
    border-radius: 0.5em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.15s;
}

.qb-inv-item:hover {
    background: var(--glass-hover);
    border-color: rgba(var(--sunset-rgb, 242, 100, 25), 0.3);
}

.qb-inv-item.added {
    opacity: 0.5;
    pointer-events: none;
}

.qb-inv-info {
    flex: 1;
    min-width: 0;
}

.qb-inv-name {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qb-inv-desc {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qb-inv-meta {
    display: flex;
    align-items: center;
    gap: 0.375em;
}

.qb-inv-price {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.qb-inv-unit {
    font-family: var(--font-sans);
    font-size: 0.625em;
    color: var(--text-tertiary);
}

.qb-inv-add {
    width: 1.75em;
    height: 1.75em;
    border-radius: 50%;
    border: none;
    background: var(--sunset-warm, #F26419);
    color: var(--button-text-on-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s;
}

.qb-inv-add:hover {
    background: var(--sunset-glow, #FF8C42);
    transform: scale(1.1);
}

.qb-inv-add svg { width: 0.875em; height: 0.875em; }

.qb-inv-empty {
    text-align: center;
    padding: 1.5em 1em;
    color: var(--text-tertiary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
}

/* ============================================ */
/*         SELECTED ITEMS                      */
/* ============================================ */

.qb-selected {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

.qb-sel-item {
    display: flex;
    align-items: center;
    gap: 0.625em;
    padding: 0.5em 0.75em;
    border-radius: 0.5em;
    background: rgba(var(--sunset-rgb, 242, 100, 25), 0.05);
    border: 1px solid rgba(var(--sunset-rgb, 242, 100, 25), 0.15);
    animation: qbItemEnter 0.25s ease-out;
}

@keyframes qbItemEnter {
    from {
        opacity: 0;
        transform: translateX(-0.5em);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.qb-sel-info {
    flex: 1;
    min-width: 0;
}

.qb-sel-name {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-primary);
}

.qb-sel-price-info {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

/* Quantity stepper */
.qb-qty-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    border-radius: 0.375em;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.qb-qty-btn {
    width: 1.75em;
    height: 1.75em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--glass-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875em;
    transition: background 0.15s;
}

.qb-qty-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.qb-qty-value {
    width: 2em;
    height: 1.75em;
    text-align: center;
    border: none;
    border-left: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.qb-qty-value:focus {
    outline: none;
}

.qb-sel-total {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 600;
    color: var(--sunset-deep, #E55100);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 5em;
    text-align: right;
}

.qb-sel-remove {
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-quaternary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.qb-sel-remove:hover {
    background: rgba(255, 59, 48, 0.12);
    color: var(--ios-system-red, #FF3B30);
}

.qb-sel-remove svg { width: 0.75em; height: 0.75em; }

/* Manual item button */
.qb-add-manual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375em;
    padding: 0.5em;
    border-radius: 0.5em;
    border: 1px dashed var(--glass-border);
    background: transparent;
    color: var(--text-tertiary);
    font-family: var(--font-sans);
    font-size: 0.75em;
    cursor: pointer;
    transition: all 0.15s;
}

.qb-add-manual:hover {
    border-color: var(--sunset-warm, #F26419);
    color: var(--sunset-warm, #F26419);
    background: rgba(var(--sunset-rgb, 242, 100, 25), 0.05);
}

.qb-add-manual svg { width: 0.875em; height: 0.875em; }

/* ============================================ */
/*         RECIPIENT SECTION (ext. clients)    */
/* ============================================ */

.qb-recipient-section {
    padding-bottom: 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

.qb-recipient-section.qb-hidden {
    display: none;
}

/* ============================================ */
/*         FORM FIELDS                         */
/* ============================================ */

.qb-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75em;
}

.qb-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

.qb-form-group.full-width {
    grid-column: 1 / -1;
}

.qb-label {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.qb-input,
.qb-textarea {
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.375em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qb-input::placeholder,
.qb-textarea::placeholder {
    color: var(--text-quaternary);
}

.qb-input:focus,
.qb-textarea:focus {
    outline: none;
    border-color: var(--sunset-warm, #F26419);
    box-shadow: 0 0 0 3px rgba(var(--sunset-rgb, 242, 100, 25), 0.15);
}

.qb-textarea {
    min-height: 4em;
    resize: vertical;
}

/* ============================================ */
/*         STICKY FOOTER (TOTALS + ACTIONS)    */
/* ============================================ */

.qb-footer {
    flex-shrink: 0;
    padding: 0.875em 1.25em;
    border-top: 2px solid var(--glass-border);
    background: var(--glass-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.qb-totals {
    display: flex;
    flex-direction: column;
    gap: 0.125em;
    margin-bottom: 0.75em;
}

.qb-total-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sans);
    font-size: 0.8125em;
}

.qb-total-label {
    color: var(--text-secondary);
}

.qb-total-value {
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.qb-total-row.grand {
    font-size: 1.0625em;
    font-weight: 700;
    padding-top: 0.375em;
    margin-top: 0.25em;
    border-top: 1px solid var(--glass-border);
}

.qb-total-row.grand .qb-total-value {
    color: var(--sunset-deep, #E55100);
}

/* Actions */
.qb-actions {
    display: flex;
    gap: 0.625em;
}

.qb-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375em;
    padding: 0.625em 1em;
    border-radius: 0.5em;
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.qb-btn-cancel {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.qb-btn-cancel:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.qb-btn-submit {
    background: var(--sunset-warm, #F26419);
    color: var(--button-text-on-color);
    font-weight: 600;
    box-shadow: 0 0.125em 0.5em rgba(var(--sunset-rgb, 242, 100, 25), 0.25);
}

.qb-btn-submit:hover {
    background: var(--sunset-glow, #FF8C42);
    box-shadow: 0 0.25em 0.75em rgba(var(--sunset-rgb, 242, 100, 25), 0.35);
}

.qb-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.qb-btn-preview {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.qb-btn-preview:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.qb-btn-preview:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qb-btn [data-icon] {
    font-size: 1.125em;
}

.qb-btn svg { width: 1.125em; height: 1.125em; }

/* ============================================ */
/*         RESPONSIVE — MOBILE (<48em)         */
/* ============================================ */

@media (max-width: 48em) {
    .qb-modal {
        max-width: none;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .qb-overlay {
        padding: 0;
    }

    .qb-form-grid {
        grid-template-columns: 1fr;
    }
}

/**
 * @file contact-chat.css
 * @description Unified contact chat widget — FAB button, full-height sidebar,
 *              contact list, conversation view, document share modal.
 *              Injected on all authenticated pages via menubar-injection middleware.
 *
 * DESIGN: Glass-morphic LinkedIn-style messaging sidebar with Three.js lava lamp
 * NAMING: .contact-chat-[element]
 * UNITS: em only (no px, no rem)
 * THEMES: All colors via CSS variables (--text-*, --glass-*, --input-*, --theme-glass-rgb)
 *
 * DEPENDENCIES: variables-v2.css, themes-v2.css, glass-system-v2.css, lava-chat.css
 */

/* ============================================ */
/*  FAB — Clothes-Tag Pull Tab (right edge)     */
/* ============================================ */

/*
 * Uses a wrapper trick for gradient border:
 * ::before = sunset-orange gradient outline
 * Main element = dark solid fill on top
 * The left + top + bottom edges show the gradient; right edge is flush.
 */

.contact-chat-fab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3em;
    height: 10em;
    border-radius: 0.75em 0 0 0.75em;
    background: rgba(12, 10, 24, 0.94);
    cursor: pointer;
    z-index: 1000;
    overflow: visible;
    padding: 0;
    border: none;
    box-shadow:
        -0.375em 0 2em rgba(0, 0, 0, 0.45),
        -0.125em 0 0.625em rgba(0, 0, 0, 0.25);
    transition:
        width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease;
}

/* Sunset-orange gradient stroke — left, top, bottom edges only */
.contact-chat-fab::before {
    content: '';
    position: absolute;
    inset: -0.125em;
    right: 0;
    border-radius: 0.875em 0 0 0.875em;
    background: linear-gradient(
        180deg,
        #f7931e 0%,
        #e8541e 35%,
        #ff6a3d 65%,
        #f7931e 100%
    );
    z-index: -1;
    pointer-events: none;
}

.contact-chat-fab:hover {
    width: 3.5em;
    box-shadow:
        -0.5em 0 2.5em rgba(0, 0, 0, 0.55),
        -0.125em 0 1em rgba(247, 147, 30, 0.15);
}

.contact-chat-fab:active {
    width: 2.75em;
}

/* Content layer — vertically centered text */
.contact-chat-fab-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* "Chat" label — vertical text */
.contact-chat-fab-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 0.0625em 0.25em rgba(0, 0, 0, 0.5);
}

/* Unread badge — floats top-left of tag */
.contact-chat-fab-badge {
    position: absolute;
    top: -0.5em;
    left: -0.5em;
    background: var(--ios-system-red, #FF3B30);
    color: var(--button-text-on-color);
    font-size: 0.75em;
    font-family: var(--font-sans);
    font-weight: 700;
    min-width: 1.5em;
    height: 1.5em;
    line-height: 1.5em;
    padding: 0 0.375em;
    border-radius: 0.75em;
    text-align: center;
    box-shadow:
        0 0.0625em 0.375em rgba(255, 59, 48, 0.5),
        0 0 0 0.125em rgba(12, 10, 24, 0.94);
    z-index: 3;
}

/* Mobile */
@media (max-width: 48em) {
    .contact-chat-fab {
        width: 2.5em;
        height: 8em;
    }

    .contact-chat-fab-label {
        font-size: 0.8125em;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .contact-chat-fab {
        transition-duration: 0.15s;
    }
}

/* ============================================ */
/*  Full-Height Sidebar                         */
/* ============================================ */

.contact-chat-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 28em;
    height: 100vh;
    height: 100dvh;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.contact-chat-sidebar.open {
    transform: translateX(0);
}

/* Content inside sidebar sits above glass overlay */
.contact-chat-sidebar-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ============================================ */
/*  Sidebar Header                              */
/* ============================================ */

.contact-chat-sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.75em 0.875em;
    border-bottom: 0.0625em solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.contact-chat-sidebar-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.125em;
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375em;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1;
    flex-shrink: 0;
    padding: 0;
}

.contact-chat-sidebar-back:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.contact-chat-sidebar-title {
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-chat-sidebar-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1.125em;
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375em;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1;
    flex-shrink: 0;
    padding: 0;
}

.contact-chat-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* ============================================ */
/*  Sidebar Search                              */
/* ============================================ */

.contact-chat-sidebar-search {
    padding: 0.5em 0.875em;
    flex-shrink: 0;
}

.contact-chat-sidebar-search input {
    width: 100%;
    padding: 0.4375em 0.75em;
    background: var(--input-bg, var(--glass-primary, rgba(255, 255, 255, 0.08)));
    border: 0.0625em solid var(--input-border, var(--glass-border, rgba(255, 255, 255, 0.15)));
    border-radius: 1.25em;
    color: var(--input-text, var(--text-primary));
    font-family: var(--font-sans);
    font-size: 0.8125em;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.contact-chat-sidebar-search input:focus {
    border-color: var(--input-border-focus, var(--ios-system-blue, #007AFF));
    background: var(--input-bg-focus, var(--glass-secondary));
}

.contact-chat-sidebar-search input::placeholder {
    color: var(--input-placeholder, var(--text-tertiary));
}

/* ============================================ */
/*  Sidebar Views (Contacts + Conversation)     */
/* ============================================ */

.contact-chat-sidebar-view {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Contacts list scrollable area */
.contact-chat-sidebar-contacts {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.contact-chat-sidebar-contacts::-webkit-scrollbar {
    width: 0.25em;
}

.contact-chat-sidebar-contacts::-webkit-scrollbar-track {
    background: transparent;
}

.contact-chat-sidebar-contacts::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 0.125em;
}

/* Conversation messages scrollable area */
.contact-chat-sidebar-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.625em 0.75em;
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.contact-chat-sidebar-messages::-webkit-scrollbar {
    width: 0.1875em;
}

.contact-chat-sidebar-messages::-webkit-scrollbar-track {
    background: transparent;
}

.contact-chat-sidebar-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 0.125em;
}

/* ============================================ */
/*  Contact Categories                          */
/* ============================================ */

.contact-chat-category {
    border-bottom: 0.0625em solid rgba(255, 255, 255, 0.06);
}

.contact-chat-category:last-child {
    border-bottom: none;
}

.contact-chat-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 0.875em;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.contact-chat-category-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.contact-chat-category-label {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.contact-chat-category-count {
    font-family: var(--font-sans);
    font-size: 0.625em;
    color: var(--text-quaternary, var(--text-tertiary));
    margin-left: 0.375em;
}

.contact-chat-category-chevron {
    color: var(--text-quaternary, var(--text-tertiary));
    font-size: 0.6875em;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
}

.contact-chat-category-chevron .radix-icon {
    width: 0.875em;
    height: 0.875em;
}

.contact-chat-category.collapsed .contact-chat-category-chevron {
    transform: rotate(-90deg);
}

.contact-chat-category-list {
    display: block;
    padding-bottom: 0.25em;
}

.contact-chat-category.collapsed .contact-chat-category-list {
    display: none;
}

/* ============================================ */
/*  Contact Items                               */
/* ============================================ */

.contact-chat-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.4375em 0.875em;
    cursor: pointer;
    transition: background 0.15s ease;
    border-left: 0.1875em solid transparent;
}

.contact-chat-contact-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--ios-system-blue, #007AFF);
}

.contact-chat-contact-avatar {
    width: 2em;
    height: 2em;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.15) 0%, rgba(0, 122, 255, 0.08) 100%);
    border: 0.0625em solid rgba(0, 122, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--ios-system-blue, #007AFF);
    flex-shrink: 0;
    overflow: hidden;
}

.contact-chat-contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-chat-contact-info {
    flex: 1;
    min-width: 0;
}

.contact-chat-contact-name {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.contact-chat-contact-role {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
    line-height: 1.3;
}

.contact-chat-contact-badge {
    background: var(--ios-system-red, #FF3B30);
    color: var(--button-text-on-color);
    font-size: 0.5625em;
    font-family: var(--font-sans);
    font-weight: 700;
    min-width: 1.375em;
    height: 1.375em;
    line-height: 1.375em;
    padding: 0 0.3125em;
    border-radius: 0.6875em;
    text-align: center;
    flex-shrink: 0;
}

/* Vendor sub-list (employees) */
.contact-chat-vendor-item {
    padding-left: 1.75em;
}

.contact-chat-vendor-company {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.4375em 0.875em;
    cursor: pointer;
    transition: background 0.15s ease;
    border-left: 0.1875em solid transparent;
}

.contact-chat-vendor-company:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--ios-system-blue, #007AFF);
}

.contact-chat-vendor-logo {
    width: 1.75em;
    height: 1.75em;
    border-radius: 0.3125em;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--glass-secondary, rgba(255, 255, 255, 0.12));
    border: 0.0625em solid var(--glass-border);
}

.contact-chat-vendor-name {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-chat-vendor-expand {
    color: var(--text-quaternary, var(--text-tertiary));
    font-size: 0.6875em;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
}

.contact-chat-vendor-expand .radix-icon {
    width: 0.75em;
    height: 0.75em;
}

.contact-chat-vendor-company.expanded .contact-chat-vendor-expand {
    transform: rotate(90deg);
}

.contact-chat-vendor-employees {
    display: none;
}

.contact-chat-vendor-company.expanded + .contact-chat-vendor-employees {
    display: block;
}

/* ============================================ */
/*  Message Bubbles (in sidebar)                */
/* ============================================ */

.contact-chat-msg-self,
.contact-chat-msg-other {
    max-width: 82%;
    padding: 0.4375em 0.6875em;
    border-radius: 1em;
    font-family: var(--font-sans);
    font-size: 0.8125em;
    line-height: 1.45;
    word-break: break-word;
}

.contact-chat-msg-self {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--ios-system-blue, #007AFF) 0%, #005ecb 100%);
    color: var(--button-text-on-color);
    border-bottom-right-radius: 0.25em;
}

.contact-chat-msg-other {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-bottom-left-radius: 0.25em;
    border: 0.0625em solid rgba(255, 255, 255, 0.08);
}

.contact-chat-msg-system {
    align-self: center;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
    font-style: italic;
    padding: 0.375em 0.625em;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0.75em;
}

.contact-chat-msg-time {
    font-size: 0.625em;
    color: var(--text-quaternary, var(--text-tertiary));
    margin-top: 0.1875em;
}

.contact-chat-msg-self .contact-chat-msg-time {
    color: var(--text-tertiary);
    text-align: right;
}

/* Document share card */
.contact-chat-msg-doc-share {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.4375em 0.5em;
    background: rgba(255, 255, 255, 0.06);
    border: 0.0625em solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5em;
    margin-top: 0.3125em;
    cursor: pointer;
    transition: background 0.15s ease;
}

.contact-chat-msg-doc-share:hover {
    background: rgba(255, 255, 255, 0.1);
}

.contact-chat-msg-doc-icon {
    font-size: 1.125em;
    color: var(--ios-system-blue);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.contact-chat-msg-doc-icon .radix-icon {
    width: 1em;
    height: 1em;
}

.contact-chat-msg-doc-info {
    flex: 1;
    min-width: 0;
}

.contact-chat-msg-doc-name {
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-chat-msg-doc-access {
    font-size: 0.625em;
    color: var(--text-tertiary);
}

/* Self-sent doc share card (on blue background) */
.contact-chat-msg-self .contact-chat-msg-doc-share {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--text-quaternary);
}

.contact-chat-msg-self .contact-chat-msg-doc-share:hover {
    background: rgba(255, 255, 255, 0.18);
}

.contact-chat-msg-self .contact-chat-msg-doc-icon {
    color: var(--text-primary);
}

.contact-chat-msg-self .contact-chat-msg-doc-name {
    color: var(--button-text-on-color);
}

.contact-chat-msg-self .contact-chat-msg-doc-access {
    color: var(--text-tertiary);
}

/* ============================================ */
/*  Sidebar Input Area                          */
/* ============================================ */

.contact-chat-sidebar-input {
    display: flex;
    align-items: flex-end;
    gap: 0.3125em;
    padding: 0.5em 0.75em;
    border-top: 0.0625em solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.contact-chat-sidebar-input textarea {
    flex: 1;
    resize: none;
    border: 0.0625em solid var(--input-border, var(--glass-border));
    border-radius: 1em;
    padding: 0.375em 0.75em;
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--input-text, var(--text-primary));
    background: var(--input-bg, rgba(255, 255, 255, 0.06));
    outline: none;
    min-height: 1.875em;
    max-height: 5em;
    line-height: 1.4;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.contact-chat-sidebar-input textarea:focus {
    border-color: var(--input-border-focus, var(--ios-system-blue, #007AFF));
    background: var(--input-bg-focus, var(--glass-secondary));
}

.contact-chat-sidebar-input textarea::placeholder {
    color: var(--input-placeholder, var(--text-tertiary));
}

/* Document share button */
.contact-chat-input-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    width: 1.75em;
    height: 1.75em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
    padding: 0;
}

.contact-chat-input-btn .radix-icon {
    width: 1em;
    height: 1em;
}

.contact-chat-input-btn:hover {
    color: var(--ios-system-blue, #007AFF);
    background: rgba(0, 122, 255, 0.08);
}

/* Send button */
.contact-chat-input-send {
    background: linear-gradient(135deg, var(--ios-system-blue, #007AFF) 0%, #005ecb 100%);
    color: var(--button-text-on-color);
    border-radius: 50%;
    width: 1.75em;
    height: 1.75em;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.contact-chat-input-send:hover {
    opacity: 0.88;
    background: linear-gradient(135deg, var(--ios-system-blue, #007AFF) 0%, #005ecb 100%);
    color: var(--button-text-on-color);
    transform: scale(1.05);
}

.contact-chat-input-send .radix-icon {
    width: 0.875em;
    height: 0.875em;
}

/* ============================================ */
/*  Document Share Modal                        */
/* ============================================ */

.contact-chat-doc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(0.25em);
    -webkit-backdrop-filter: blur(0.25em);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-chat-doc-modal {
    background: rgba(var(--theme-glass-rgb, 255, 255, 255), 0.92);
    backdrop-filter: blur(2.5em) saturate(180%);
    -webkit-backdrop-filter: blur(2.5em) saturate(180%);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.75em;
    width: 90%;
    max-width: 26em;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 1em 3em rgba(0, 0, 0, 0.2),
        0 0.25em 0.75em rgba(0, 0, 0, 0.1);
}

.contact-chat-doc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75em 0.875em;
    border-bottom: 0.0625em solid var(--glass-border);
    background: rgba(var(--theme-glass-rgb, 255, 255, 255), 0.06);
}

.contact-chat-doc-modal-title {
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.contact-chat-doc-modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1.125em;
    width: 1.75em;
    height: 1.75em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375em;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1;
}

.contact-chat-doc-modal-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.contact-chat-doc-modal-search {
    padding: 0.5em 0.75em;
}

.contact-chat-doc-modal-search input {
    width: 100%;
    padding: 0.4375em 0.75em;
    background: var(--input-bg, var(--glass-primary));
    border: 0.0625em solid var(--input-border, var(--glass-border));
    border-radius: 1.25em;
    color: var(--input-text, var(--text-primary));
    font-family: var(--font-sans);
    font-size: 0.8125em;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.contact-chat-doc-modal-search input:focus {
    border-color: var(--input-border-focus, var(--ios-system-blue));
    background: var(--input-bg-focus, var(--glass-secondary));
}

.contact-chat-doc-modal-search input::placeholder {
    color: var(--input-placeholder, var(--text-tertiary));
}

.contact-chat-doc-modal-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.25em 0.5em 0.5em;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

.contact-chat-doc-modal-list::-webkit-scrollbar {
    width: 0.25em;
}

.contact-chat-doc-modal-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 0.125em;
}

.contact-chat-doc-modal-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.4375em 0.5em;
    cursor: pointer;
    border-radius: 0.375em;
    transition: background 0.15s ease;
    border: 0.0625em solid transparent;
}

.contact-chat-doc-modal-item:hover {
    background: var(--glass-hover, rgba(255, 255, 255, 0.08));
}

.contact-chat-doc-modal-item.selected {
    background: rgba(0, 122, 255, 0.08);
    border-color: var(--ios-system-blue);
}

.contact-chat-doc-modal-item-icon {
    font-size: 1.25em;
    color: var(--ios-system-blue);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.contact-chat-doc-modal-item-icon .radix-icon {
    width: 1em;
    height: 1em;
}

.contact-chat-doc-modal-item-name {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-chat-doc-modal-footer {
    padding: 0.625em 0.75em;
    border-top: 0.0625em solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 0.4375em;
    background: rgba(var(--theme-glass-rgb, 255, 255, 255), 0.04);
}

.contact-chat-doc-modal-access {
    display: flex;
    gap: 0.375em;
}

.contact-chat-doc-modal-access-btn {
    flex: 1;
    padding: 0.375em 0.5em;
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.375em;
    background: var(--glass-primary, rgba(255, 255, 255, 0.06));
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.6875em;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.contact-chat-doc-modal-access-btn:hover {
    background: var(--glass-hover, rgba(255, 255, 255, 0.1));
}

.contact-chat-doc-modal-access-btn.selected {
    border-color: var(--ios-system-blue);
    background: rgba(0, 122, 255, 0.1);
    color: var(--ios-system-blue);
    font-weight: 500;
}

.contact-chat-doc-modal-share-btn {
    width: 100%;
    padding: 0.5em;
    border: none;
    border-radius: 0.375em;
    background: linear-gradient(135deg, var(--ios-system-blue) 0%, #005ecb 100%);
    color: var(--button-text-on-color);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.contact-chat-doc-modal-share-btn:hover {
    opacity: 0.9;
}

.contact-chat-doc-modal-share-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================ */
/*  Empty / Loading States                      */
/* ============================================ */

.contact-chat-empty {
    padding: 1.5em 1em;
    text-align: center;
    color: var(--text-tertiary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    line-height: 1.5;
}

.contact-chat-empty-icon {
    display: block;
    font-size: 1.75em;
    margin-bottom: 0.375em;
    opacity: 0.5;
}

.contact-chat-loading {
    padding: 1.5em 1em;
    text-align: center;
    color: var(--text-tertiary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
}

/* Loading spinner animation */
.contact-chat-loading::before {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 0.125em solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--ios-system-blue);
    border-radius: 50%;
    animation: contactChatSpin 0.6s linear infinite;
    margin-bottom: 0.375em;
    vertical-align: middle;
    margin-right: 0.375em;
}

@keyframes contactChatSpin {
    to { transform: rotate(360deg); }
}

/* ============================================ */
/*  Responsive: Mobile                          */
/* ============================================ */

@media (max-width: 48em) {
    .contact-chat-sidebar {
        width: 100vw;
    }
}

/* ============================================ */
/*  Translation Toggle + Inline Translation     */
/* ============================================ */

.contact-chat-translate-toggle {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375em;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
    padding: 0;
    font-size: 0.9375em;
}

.contact-chat-translate-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.contact-chat-translate-toggle.active {
    color: var(--ios-system-blue, #007AFF);
    background: rgba(0, 122, 255, 0.1);
}

.contact-chat-translate-link {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.5625em;
    color: var(--ios-system-blue, #007AFF);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease;
    margin-top: 0.125em;
}

.contact-chat-translate-link:hover {
    opacity: 1;
}

.contact-chat-msg-self .contact-chat-translate-link {
    color: var(--text-secondary);
}

.contact-chat-msg-self .contact-chat-translate-link:hover {
    color: var(--text-primary);
}

.contact-chat-msg-translated {
    font-style: italic;
    opacity: 0.92;
}

.contact-chat-msg-translating {
    font-size: 0.5625em;
    color: var(--text-quaternary, var(--text-tertiary));
    font-style: italic;
    margin-top: 0.125em;
}

/* ============================================ */
/*  Quote Message Cards                         */
/* ============================================ */

.contact-chat-msg-quote {
    background: rgba(var(--theme-glass-rgb, 255, 255, 255), 0.06);
    border: 0.0625em solid var(--glass-border, rgba(255, 255, 255, 0.12));
    border-radius: 0.625em;
    padding: 0.5em 0.625em;
    margin-top: 0.1875em;
}

.contact-chat-msg-quote-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.375em;
    margin-bottom: 0.25em;
}

.contact-chat-msg-quote-title {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-chat-msg-quote-status {
    font-family: var(--font-sans);
    font-size: 0.5625em;
    font-weight: 600;
    padding: 0.1875em 0.5em;
    border-radius: 0.625em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.contact-chat-msg-quote-status[data-status="sent"],
.contact-chat-msg-quote-status[data-status="pending"] {
    background: rgba(0, 122, 255, 0.12);
    color: var(--ios-system-blue, #007AFF);
}

.contact-chat-msg-quote-status[data-status="accepted"] {
    background: rgba(52, 199, 89, 0.12);
    color: var(--ios-system-green, #34C759);
}

.contact-chat-msg-quote-status[data-status="rejected"],
.contact-chat-msg-quote-status[data-status="declined"] {
    background: rgba(255, 59, 48, 0.12);
    color: var(--ios-system-red, #FF3B30);
}

.contact-chat-msg-quote-status[data-status="draft"] {
    background: rgba(var(--theme-glass-rgb, 255, 255, 255), 0.08);
    color: var(--text-tertiary);
}

.contact-chat-msg-quote-total {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25em;
}

.contact-chat-msg-quote-actions {
    display: flex;
    gap: 0.3125em;
    margin-top: 0.375em;
}

.contact-chat-msg-quote-btn {
    flex: 1;
    padding: 0.3125em 0.375em;
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.375em;
    background: var(--glass-primary, rgba(255, 255, 255, 0.06));
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.625em;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.contact-chat-msg-quote-btn:hover {
    background: var(--glass-hover, rgba(255, 255, 255, 0.1));
}

.contact-chat-msg-quote-btn[data-action="accept-quote"] {
    border-color: var(--ios-system-green, #34C759);
    color: var(--ios-system-green, #34C759);
}

.contact-chat-msg-quote-btn[data-action="accept-quote"]:hover {
    background: rgba(52, 199, 89, 0.12);
}

.contact-chat-msg-quote-btn[data-action="reject-quote"] {
    border-color: var(--ios-system-red, #FF3B30);
    color: var(--ios-system-red, #FF3B30);
}

.contact-chat-msg-quote-btn[data-action="reject-quote"]:hover {
    background: rgba(255, 59, 48, 0.12);
}

/* Self-sent quote cards (on blue background) */
.contact-chat-msg-self .contact-chat-msg-quote {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.contact-chat-msg-self .contact-chat-msg-quote-title {
    color: var(--button-text-on-color);
}

.contact-chat-msg-self .contact-chat-msg-quote-total {
    color: var(--button-text-on-color);
}

/* Quote request card */
.contact-chat-msg-quote-request {
    background: rgba(255, 149, 0, 0.08);
    border: 0.0625em solid rgba(255, 149, 0, 0.2);
    border-radius: 0.625em;
    padding: 0.4375em 0.625em;
    margin-top: 0.1875em;
}

.contact-chat-msg-quote-request-label {
    font-family: var(--font-sans);
    font-size: 0.5625em;
    font-weight: 600;
    color: var(--ios-system-orange, #FF9500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.1875em;
}

/* Quote panel (slide-up from bottom of conversation area) */
.contact-chat-quote-panel {
    border-top: 0.0625em solid var(--glass-border, rgba(255, 255, 255, 0.1));
    background: rgba(var(--theme-glass-rgb, 0, 0, 0), 0.4);
    backdrop-filter: blur(1.25em);
    -webkit-backdrop-filter: blur(1.25em);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.contact-chat-quote-panel.open {
    max-height: 22em;
    overflow-y: auto;
}

.contact-chat-quote-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 0.75em;
    border-bottom: 0.0625em solid rgba(255, 255, 255, 0.06);
}

.contact-chat-quote-panel-title {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-chat-quote-panel-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 0.875em;
    padding: 0.25em;
}

.contact-chat-quote-panel-list {
    padding: 0.375em 0.75em;
}

.contact-chat-quote-panel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.375em 0.5em;
    border-bottom: 0.0625em solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.15s ease;
    border-radius: 0.25em;
}

.contact-chat-quote-panel-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.contact-chat-quote-panel-item-title {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-chat-quote-panel-item-total {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
    margin-left: 0.5em;
}

/* ============================================ */
/*  Utility: hidden                             */
/* ============================================ */

.contact-chat-hidden {
    display: none;
}

/* ============================================ */
/*  Auftrag Thread Indicator + Badge            */
/* ============================================ */

.contact-chat-thread-indicator {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.75em;
    margin: 0 0.5em 0.5em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    font-size: 0.8125em;
    color: var(--text-secondary);
}

.contact-chat-thread-indicator [data-icon] {
    color: var(--ios-system-blue);
    flex-shrink: 0;
}

.contact-chat-thread-clear {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--ios-system-blue);
    cursor: pointer;
    font-size: 0.8125em;
    padding: 0.125em 0.25em;
    white-space: nowrap;
}

.contact-chat-thread-clear:hover {
    text-decoration: underline;
}

.contact-chat-msg-auftrag-badge {
    display: inline-block;
    margin-top: 0.25em;
    padding: 0.125em 0.5em;
    background: rgba(0, 122, 255, 0.12);
    color: var(--ios-system-blue);
    border-radius: 0.25em;
    font-size: 0.6875em;
    cursor: pointer;
    transition: background 0.15s ease;
}

.contact-chat-msg-auftrag-badge:hover {
    background: rgba(0, 122, 255, 0.22);
}

/**
 * @file job-review.css
 * @filepath public/css/components/job-review.css
 * @description Styles for the owner-side job review modal.
 *   Used on aufgaben.html when reviewing vendor job completions.
 * @created 2026-03-02
 */

/* ============================================ */
/*  Job Review Modal Overlay                    */
/* ============================================ */

.job-review-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.job-review-modal {
    max-width: 40em;
    width: calc(100% - 2em);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================================ */
/*  Header                                      */
/* ============================================ */

.job-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

.job-review-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 0.125em 0.375em;
    line-height: 1;
    border-radius: 0.25em;
    transition: background 0.15s ease;
}

.job-review-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.job-review-vendor {
    padding: 0.5em 1.25em;
    font-size: 0.875em;
    color: var(--text-secondary);
}

/* ============================================ */
/*  Content                                     */
/* ============================================ */

.job-review-content {
    flex: 1;
    overflow-y: auto;
    padding: 1em 1.25em;
}

.job-review-section {
    margin-bottom: 1.25em;
}

.job-review-section:last-child {
    margin-bottom: 0;
}

/* ============================================ */
/*  Photo Gallery                               */
/* ============================================ */

.job-review-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5em;
    margin-top: 0.5em;
}

.job-review-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.job-review-photo:hover {
    transform: scale(1.03);
}

/* ============================================ */
/*  Materials                                   */
/* ============================================ */

.job-review-materials {
    list-style: none;
    padding: 0;
    margin: 0.5em 0 0;
}

.job-review-materials li {
    padding: 0.375em 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.875em;
    color: var(--text-primary);
}

.job-review-materials li:last-child {
    border-bottom: none;
}

/* ============================================ */
/*  Notes + Signature                           */
/* ============================================ */

.job-review-notes {
    width: 100%;
    padding: 0.625em;
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    font-size: 0.875em;
    color: var(--text-primary);
    background: var(--glass-primary);
    resize: vertical;
    margin-top: 0.5em;
}

.job-review-notes:focus {
    outline: none;
    border-color: var(--ios-system-blue);
}

.job-review-signature-canvas {
    width: 100%;
    height: 9em;
    border: 1px dashed var(--glass-border);
    border-radius: 0.5em;
    cursor: crosshair;
    margin-top: 0.5em;
    background: var(--glass-primary);
}

.job-review-signature-name {
    width: 100%;
    padding: 0.5em 0.625em;
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    font-size: 0.875em;
    color: var(--text-primary);
    background: var(--glass-primary);
    margin-top: 0.5em;
}

.job-review-signature-name:focus {
    outline: none;
    border-color: var(--ios-system-blue);
}

/* ============================================ */
/*  Footer Actions                              */
/* ============================================ */

.job-review-footer {
    display: flex;
    gap: 0.75em;
    padding: 1em 1.25em;
    border-top: 1px solid var(--glass-border);
    justify-content: flex-end;
}

.job-review-btn {
    padding: 0.5em 1.25em;
    border: none;
    border-radius: 0.5em;
    font-size: 0.875em;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.job-review-btn:hover {
    opacity: 0.85;
}

.job-review-btn-approve {
    background: var(--ios-system-green);
    color: var(--button-text-on-color);
}

.job-review-btn-reject {
    background: var(--glass-secondary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

/* ============================================ */
/*  Responsive                                  */
/* ============================================ */

@media (max-width: 30em) {
    .job-review-modal {
        max-height: 100vh;
        height: 100vh;
        width: 100%;
        border-radius: 0;
    }

    .job-review-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/**
 * =========================================================================
 * LAVA CHAT — Three.js Fluid Metaball Sidebar Background
 * =========================================================================
 * WebGL lava lamp canvas behind the contact-chat sidebar.
 * Glass overlay provides blur effect over animated background.
 *
 * DEPENDENCIES: contact-chat.css (sidebar layout)
 * USED BY: public/js/components/contact-chat.js
 * =========================================================================
 */

/* ---- Sidebar Canvas (behind sidebar content) ---- */
.contact-chat-sidebar-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
    border-radius: inherit;
}

/* ---- Glass overlay on sidebar (blur over lava canvas) ---- */
.contact-chat-sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(var(--theme-glass-rgb, 10, 8, 20), 0.5);
    backdrop-filter: blur(48px) saturate(130%);
    -webkit-backdrop-filter: blur(48px) saturate(130%);
    border-left: 0.0625em solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

/* ---- Sidebar Backdrop ---- */
.contact-chat-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background 0.5s ease;
}

.contact-chat-backdrop.active {
    background: rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    cursor: pointer;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    .contact-chat-sidebar {
        transition-duration: 0.15s;
    }

    .contact-chat-backdrop {
        transition-duration: 0.15s;
    }
}


/* ============================================ */
/*              10. UTILITIES                   */
/*   Simplified utility classes (V2)           */
/* ============================================ */
/**
 * COEUS DESIGN SYSTEM V2 - SPACING UTILITIES
 *
 * PURPOSE:
 * Standardized Tailwind-style spacing utilities
 * Number-based scale for consistent spacing rhythm
 *
 * SCALE (1 unit = 0.25rem = 4px):
 * 0  = 0       (no spacing)
 * 1  = 0.25rem (4px)
 * 2  = 0.5rem  (8px)
 * 3  = 0.75rem (12px)
 * 4  = 1rem    (16px)  ← Default spacing
 * 5  = 1.25rem (20px)
 * 6  = 1.5rem  (24px)
 * 8  = 2rem    (32px)
 * 10 = 2.5rem  (40px)
 * 12 = 3rem    (48px)
 * 16 = 4rem    (64px)
 * 20 = 5rem    (80px)
 * 24 = 6rem    (96px)
 *
 * MIGRATION FROM V1:
 * - p-xs  → p-1
 * - p-sm  → p-2
 * - p-md  → p-4
 * - p-lg  → p-6
 * - p-xl  → p-8
 * - p-2xl → p-12
 * - p-3xl → p-16
 *
 * DEPENDENCIES: design-tokens.css
 * VERSION: 3.0.0
 * UPDATED: 2026-03-03 — Added legacy V1 aliases (p-xs/sm/md/lg/xl etc.)
 */

/* ============================================ */
/*              PADDING - ALL SIDES             */
/* ============================================ */

.p-0  { padding: var(--spacing-0); }
.p-1  { padding: var(--spacing-1); }
.p-2  { padding: var(--spacing-2); }
.p-3  { padding: var(--spacing-3); }
.p-4  { padding: var(--spacing-4); }
.p-5  { padding: var(--spacing-5); }
.p-6  { padding: var(--spacing-6); }
.p-7  { padding: var(--spacing-7); }
.p-8  { padding: var(--spacing-8); }
.p-10 { padding: var(--spacing-10); }
.p-12 { padding: var(--spacing-12); }
.p-16 { padding: var(--spacing-16); }
.p-20 { padding: var(--spacing-20); }
.p-24 { padding: var(--spacing-24); }

/* ============================================ */
/*           PADDING - HORIZONTAL (X-axis)      */
/* ============================================ */

.px-0  { padding-left: var(--spacing-0); padding-right: var(--spacing-0); }
.px-1  { padding-left: var(--spacing-1); padding-right: var(--spacing-1); }
.px-2  { padding-left: var(--spacing-2); padding-right: var(--spacing-2); }
.px-3  { padding-left: var(--spacing-3); padding-right: var(--spacing-3); }
.px-4  { padding-left: var(--spacing-4); padding-right: var(--spacing-4); }
.px-5  { padding-left: var(--spacing-5); padding-right: var(--spacing-5); }
.px-6  { padding-left: var(--spacing-6); padding-right: var(--spacing-6); }
.px-7  { padding-left: var(--spacing-7); padding-right: var(--spacing-7); }
.px-8  { padding-left: var(--spacing-8); padding-right: var(--spacing-8); }
.px-10 { padding-left: var(--spacing-10); padding-right: var(--spacing-10); }
.px-12 { padding-left: var(--spacing-12); padding-right: var(--spacing-12); }
.px-16 { padding-left: var(--spacing-16); padding-right: var(--spacing-16); }
.px-20 { padding-left: var(--spacing-20); padding-right: var(--spacing-20); }
.px-24 { padding-left: var(--spacing-24); padding-right: var(--spacing-24); }

/* ============================================ */
/*            PADDING - VERTICAL (Y-axis)       */
/* ============================================ */

.py-0  { padding-top: var(--spacing-0); padding-bottom: var(--spacing-0); }
.py-1  { padding-top: var(--spacing-1); padding-bottom: var(--spacing-1); }
.py-2  { padding-top: var(--spacing-2); padding-bottom: var(--spacing-2); }
.py-3  { padding-top: var(--spacing-3); padding-bottom: var(--spacing-3); }
.py-4  { padding-top: var(--spacing-4); padding-bottom: var(--spacing-4); }
.py-5  { padding-top: var(--spacing-5); padding-bottom: var(--spacing-5); }
.py-6  { padding-top: var(--spacing-6); padding-bottom: var(--spacing-6); }
.py-7  { padding-top: var(--spacing-7); padding-bottom: var(--spacing-7); }
.py-8  { padding-top: var(--spacing-8); padding-bottom: var(--spacing-8); }
.py-10 { padding-top: var(--spacing-10); padding-bottom: var(--spacing-10); }
.py-12 { padding-top: var(--spacing-12); padding-bottom: var(--spacing-12); }
.py-16 { padding-top: var(--spacing-16); padding-bottom: var(--spacing-16); }
.py-20 { padding-top: var(--spacing-20); padding-bottom: var(--spacing-20); }
.py-24 { padding-top: var(--spacing-24); padding-bottom: var(--spacing-24); }

/* ============================================ */
/*          PADDING - INDIVIDUAL SIDES          */
/* ============================================ */

/* Padding Top */
.pt-0  { padding-top: var(--spacing-0); }
.pt-1  { padding-top: var(--spacing-1); }
.pt-2  { padding-top: var(--spacing-2); }
.pt-3  { padding-top: var(--spacing-3); }
.pt-4  { padding-top: var(--spacing-4); }
.pt-5  { padding-top: var(--spacing-5); }
.pt-6  { padding-top: var(--spacing-6); }
.pt-7  { padding-top: var(--spacing-7); }
.pt-8  { padding-top: var(--spacing-8); }
.pt-10 { padding-top: var(--spacing-10); }
.pt-12 { padding-top: var(--spacing-12); }
.pt-16 { padding-top: var(--spacing-16); }
.pt-20 { padding-top: var(--spacing-20); }
.pt-24 { padding-top: var(--spacing-24); }

/* Padding Right */
.pr-0  { padding-right: var(--spacing-0); }
.pr-1  { padding-right: var(--spacing-1); }
.pr-2  { padding-right: var(--spacing-2); }
.pr-3  { padding-right: var(--spacing-3); }
.pr-4  { padding-right: var(--spacing-4); }
.pr-5  { padding-right: var(--spacing-5); }
.pr-6  { padding-right: var(--spacing-6); }
.pr-7  { padding-right: var(--spacing-7); }
.pr-8  { padding-right: var(--spacing-8); }
.pr-10 { padding-right: var(--spacing-10); }
.pr-12 { padding-right: var(--spacing-12); }
.pr-16 { padding-right: var(--spacing-16); }
.pr-20 { padding-right: var(--spacing-20); }
.pr-24 { padding-right: var(--spacing-24); }

/* Padding Bottom */
.pb-0  { padding-bottom: var(--spacing-0); }
.pb-1  { padding-bottom: var(--spacing-1); }
.pb-2  { padding-bottom: var(--spacing-2); }
.pb-3  { padding-bottom: var(--spacing-3); }
.pb-4  { padding-bottom: var(--spacing-4); }
.pb-5  { padding-bottom: var(--spacing-5); }
.pb-6  { padding-bottom: var(--spacing-6); }
.pb-7  { padding-bottom: var(--spacing-7); }
.pb-8  { padding-bottom: var(--spacing-8); }
.pb-10 { padding-bottom: var(--spacing-10); }
.pb-12 { padding-bottom: var(--spacing-12); }
.pb-16 { padding-bottom: var(--spacing-16); }
.pb-20 { padding-bottom: var(--spacing-20); }
.pb-24 { padding-bottom: var(--spacing-24); }

/* Padding Left */
.pl-0  { padding-left: var(--spacing-0); }
.pl-1  { padding-left: var(--spacing-1); }
.pl-2  { padding-left: var(--spacing-2); }
.pl-3  { padding-left: var(--spacing-3); }
.pl-4  { padding-left: var(--spacing-4); }
.pl-5  { padding-left: var(--spacing-5); }
.pl-6  { padding-left: var(--spacing-6); }
.pl-7  { padding-left: var(--spacing-7); }
.pl-8  { padding-left: var(--spacing-8); }
.pl-10 { padding-left: var(--spacing-10); }
.pl-12 { padding-left: var(--spacing-12); }
.pl-16 { padding-left: var(--spacing-16); }
.pl-20 { padding-left: var(--spacing-20); }
.pl-24 { padding-left: var(--spacing-24); }

/* ============================================ */
/*              MARGIN - ALL SIDES              */
/* ============================================ */

.m-0  { margin: var(--spacing-0); }
.m-1  { margin: var(--spacing-1); }
.m-2  { margin: var(--spacing-2); }
.m-3  { margin: var(--spacing-3); }
.m-4  { margin: var(--spacing-4); }
.m-5  { margin: var(--spacing-5); }
.m-6  { margin: var(--spacing-6); }
.m-7  { margin: var(--spacing-7); }
.m-8  { margin: var(--spacing-8); }
.m-10 { margin: var(--spacing-10); }
.m-12 { margin: var(--spacing-12); }
.m-16 { margin: var(--spacing-16); }
.m-20 { margin: var(--spacing-20); }
.m-24 { margin: var(--spacing-24); }

/* Auto margin for centering */
.m-auto { margin: auto; }

/* ============================================ */
/*           MARGIN - HORIZONTAL (X-axis)       */
/* ============================================ */

.mx-0  { margin-left: var(--spacing-0); margin-right: var(--spacing-0); }
.mx-1  { margin-left: var(--spacing-1); margin-right: var(--spacing-1); }
.mx-2  { margin-left: var(--spacing-2); margin-right: var(--spacing-2); }
.mx-3  { margin-left: var(--spacing-3); margin-right: var(--spacing-3); }
.mx-4  { margin-left: var(--spacing-4); margin-right: var(--spacing-4); }
.mx-5  { margin-left: var(--spacing-5); margin-right: var(--spacing-5); }
.mx-6  { margin-left: var(--spacing-6); margin-right: var(--spacing-6); }
.mx-7  { margin-left: var(--spacing-7); margin-right: var(--spacing-7); }
.mx-8  { margin-left: var(--spacing-8); margin-right: var(--spacing-8); }
.mx-10 { margin-left: var(--spacing-10); margin-right: var(--spacing-10); }
.mx-12 { margin-left: var(--spacing-12); margin-right: var(--spacing-12); }
.mx-16 { margin-left: var(--spacing-16); margin-right: var(--spacing-16); }
.mx-20 { margin-left: var(--spacing-20); margin-right: var(--spacing-20); }
.mx-24 { margin-left: var(--spacing-24); margin-right: var(--spacing-24); }

/* Auto horizontal margin for centering */
.mx-auto { margin-left: auto; margin-right: auto; }

/* ============================================ */
/*            MARGIN - VERTICAL (Y-axis)        */
/* ============================================ */

.my-0  { margin-top: var(--spacing-0); margin-bottom: var(--spacing-0); }
.my-1  { margin-top: var(--spacing-1); margin-bottom: var(--spacing-1); }
.my-2  { margin-top: var(--spacing-2); margin-bottom: var(--spacing-2); }
.my-3  { margin-top: var(--spacing-3); margin-bottom: var(--spacing-3); }
.my-4  { margin-top: var(--spacing-4); margin-bottom: var(--spacing-4); }
.my-5  { margin-top: var(--spacing-5); margin-bottom: var(--spacing-5); }
.my-6  { margin-top: var(--spacing-6); margin-bottom: var(--spacing-6); }
.my-7  { margin-top: var(--spacing-7); margin-bottom: var(--spacing-7); }
.my-8  { margin-top: var(--spacing-8); margin-bottom: var(--spacing-8); }
.my-10 { margin-top: var(--spacing-10); margin-bottom: var(--spacing-10); }
.my-12 { margin-top: var(--spacing-12); margin-bottom: var(--spacing-12); }
.my-16 { margin-top: var(--spacing-16); margin-bottom: var(--spacing-16); }
.my-20 { margin-top: var(--spacing-20); margin-bottom: var(--spacing-20); }
.my-24 { margin-top: var(--spacing-24); margin-bottom: var(--spacing-24); }

/* ============================================ */
/*          MARGIN - INDIVIDUAL SIDES           */
/* ============================================ */

/* Margin Top */
.mt-0  { margin-top: var(--spacing-0); }
.mt-1  { margin-top: var(--spacing-1); }
.mt-2  { margin-top: var(--spacing-2); }
.mt-3  { margin-top: var(--spacing-3); }
.mt-4  { margin-top: var(--spacing-4); }
.mt-5  { margin-top: var(--spacing-5); }
.mt-6  { margin-top: var(--spacing-6); }
.mt-7  { margin-top: var(--spacing-7); }
.mt-8  { margin-top: var(--spacing-8); }
.mt-10 { margin-top: var(--spacing-10); }
.mt-12 { margin-top: var(--spacing-12); }
.mt-16 { margin-top: var(--spacing-16); }
.mt-20 { margin-top: var(--spacing-20); }
.mt-24 { margin-top: var(--spacing-24); }

/* Margin Right */
.mr-0  { margin-right: var(--spacing-0); }
.mr-1  { margin-right: var(--spacing-1); }
.mr-2  { margin-right: var(--spacing-2); }
.mr-3  { margin-right: var(--spacing-3); }
.mr-4  { margin-right: var(--spacing-4); }
.mr-5  { margin-right: var(--spacing-5); }
.mr-6  { margin-right: var(--spacing-6); }
.mr-7  { margin-right: var(--spacing-7); }
.mr-8  { margin-right: var(--spacing-8); }
.mr-10 { margin-right: var(--spacing-10); }
.mr-12 { margin-right: var(--spacing-12); }
.mr-16 { margin-right: var(--spacing-16); }
.mr-20 { margin-right: var(--spacing-20); }
.mr-24 { margin-right: var(--spacing-24); }

/* Margin Bottom */
.mb-0  { margin-bottom: var(--spacing-0); }
.mb-1  { margin-bottom: var(--spacing-1); }
.mb-2  { margin-bottom: var(--spacing-2); }
.mb-3  { margin-bottom: var(--spacing-3); }
.mb-4  { margin-bottom: var(--spacing-4); }
.mb-5  { margin-bottom: var(--spacing-5); }
.mb-6  { margin-bottom: var(--spacing-6); }
.mb-7  { margin-bottom: var(--spacing-7); }
.mb-8  { margin-bottom: var(--spacing-8); }
.mb-10 { margin-bottom: var(--spacing-10); }
.mb-12 { margin-bottom: var(--spacing-12); }
.mb-16 { margin-bottom: var(--spacing-16); }
.mb-20 { margin-bottom: var(--spacing-20); }
.mb-24 { margin-bottom: var(--spacing-24); }

/* Margin Left */
.ml-0  { margin-left: var(--spacing-0); }
.ml-1  { margin-left: var(--spacing-1); }
.ml-2  { margin-left: var(--spacing-2); }
.ml-3  { margin-left: var(--spacing-3); }
.ml-4  { margin-left: var(--spacing-4); }
.ml-5  { margin-left: var(--spacing-5); }
.ml-6  { margin-left: var(--spacing-6); }
.ml-7  { margin-left: var(--spacing-7); }
.ml-8  { margin-left: var(--spacing-8); }
.ml-10 { margin-left: var(--spacing-10); }
.ml-12 { margin-left: var(--spacing-12); }
.ml-16 { margin-left: var(--spacing-16); }
.ml-20 { margin-left: var(--spacing-20); }
.ml-24 { margin-left: var(--spacing-24); }

/* ============================================ */
/*                    GAP                       */
/*   Flexbox and Grid gap spacing              */
/* ============================================ */

.gap-0  { gap: var(--spacing-0); }
.gap-1  { gap: var(--spacing-1); }
.gap-2  { gap: var(--spacing-2); }
.gap-3  { gap: var(--spacing-3); }
.gap-4  { gap: var(--spacing-4); }
.gap-5  { gap: var(--spacing-5); }
.gap-6  { gap: var(--spacing-6); }
.gap-7  { gap: var(--spacing-7); }
.gap-8  { gap: var(--spacing-8); }
.gap-10 { gap: var(--spacing-10); }
.gap-12 { gap: var(--spacing-12); }
.gap-16 { gap: var(--spacing-16); }
.gap-20 { gap: var(--spacing-20); }
.gap-24 { gap: var(--spacing-24); }

/* Gap X (column-gap) */
.gap-x-0  { column-gap: var(--spacing-0); }
.gap-x-1  { column-gap: var(--spacing-1); }
.gap-x-2  { column-gap: var(--spacing-2); }
.gap-x-3  { column-gap: var(--spacing-3); }
.gap-x-4  { column-gap: var(--spacing-4); }
.gap-x-5  { column-gap: var(--spacing-5); }
.gap-x-6  { column-gap: var(--spacing-6); }
.gap-x-7  { column-gap: var(--spacing-7); }
.gap-x-8  { column-gap: var(--spacing-8); }
.gap-x-10 { column-gap: var(--spacing-10); }
.gap-x-12 { column-gap: var(--spacing-12); }
.gap-x-16 { column-gap: var(--spacing-16); }
.gap-x-20 { column-gap: var(--spacing-20); }
.gap-x-24 { column-gap: var(--spacing-24); }

/* Gap Y (row-gap) */
.gap-y-0  { row-gap: var(--spacing-0); }
.gap-y-1  { row-gap: var(--spacing-1); }
.gap-y-2  { row-gap: var(--spacing-2); }
.gap-y-3  { row-gap: var(--spacing-3); }
.gap-y-4  { row-gap: var(--spacing-4); }
.gap-y-5  { row-gap: var(--spacing-5); }
.gap-y-6  { row-gap: var(--spacing-6); }
.gap-y-7  { row-gap: var(--spacing-7); }
.gap-y-8  { row-gap: var(--spacing-8); }
.gap-y-10 { row-gap: var(--spacing-10); }
.gap-y-12 { row-gap: var(--spacing-12); }
.gap-y-16 { row-gap: var(--spacing-16); }
.gap-y-20 { row-gap: var(--spacing-20); }
.gap-y-24 { row-gap: var(--spacing-24); }

/* ============================================ */
/*                SPACE BETWEEN                 */
/*   Add spacing between flex/grid children    */
/* ============================================ */

.space-x-0 > * + * { margin-left: var(--spacing-0); }
.space-x-1 > * + * { margin-left: var(--spacing-1); }
.space-x-2 > * + * { margin-left: var(--spacing-2); }
.space-x-3 > * + * { margin-left: var(--spacing-3); }
.space-x-4 > * + * { margin-left: var(--spacing-4); }
.space-x-5 > * + * { margin-left: var(--spacing-5); }
.space-x-6 > * + * { margin-left: var(--spacing-6); }
.space-x-8 > * + * { margin-left: var(--spacing-8); }

.space-y-0 > * + * { margin-top: var(--spacing-0); }
.space-y-1 > * + * { margin-top: var(--spacing-1); }
.space-y-2 > * + * { margin-top: var(--spacing-2); }
.space-y-3 > * + * { margin-top: var(--spacing-3); }
.space-y-4 > * + * { margin-top: var(--spacing-4); }
.space-y-5 > * + * { margin-top: var(--spacing-5); }
.space-y-6 > * + * { margin-top: var(--spacing-6); }
.space-y-8 > * + * { margin-top: var(--spacing-8); }

/* ============================================ */
/*    LEGACY ALIASES (V1 → V2 migration)        */
/*    xs=1(4px) sm=2(8px) md=4(16px)            */
/*    lg=6(24px) xl=8(32px) 2xl=12 3xl=16       */
/* ============================================ */

/* Padding */
.p-xs  { padding: var(--spacing-1); }
.p-sm  { padding: var(--spacing-2); }
.p-md  { padding: var(--spacing-4); }
.p-lg  { padding: var(--spacing-6); }
.p-xl  { padding: var(--spacing-8); }
.p-2xl { padding: var(--spacing-12); }
.p-3xl { padding: var(--spacing-16); }

.px-xs  { padding-left: var(--spacing-1); padding-right: var(--spacing-1); }
.px-sm  { padding-left: var(--spacing-2); padding-right: var(--spacing-2); }
.px-md  { padding-left: var(--spacing-4); padding-right: var(--spacing-4); }
.px-lg  { padding-left: var(--spacing-6); padding-right: var(--spacing-6); }
.px-xl  { padding-left: var(--spacing-8); padding-right: var(--spacing-8); }

.py-xs  { padding-top: var(--spacing-1); padding-bottom: var(--spacing-1); }
.py-sm  { padding-top: var(--spacing-2); padding-bottom: var(--spacing-2); }
.py-md  { padding-top: var(--spacing-4); padding-bottom: var(--spacing-4); }
.py-lg  { padding-top: var(--spacing-6); padding-bottom: var(--spacing-6); }
.py-xl  { padding-top: var(--spacing-8); padding-bottom: var(--spacing-8); }

/* Margin */
.m-xs  { margin: var(--spacing-1); }
.m-sm  { margin: var(--spacing-2); }
.m-md  { margin: var(--spacing-4); }
.m-lg  { margin: var(--spacing-6); }
.m-xl  { margin: var(--spacing-8); }

.mt-xs  { margin-top: var(--spacing-1); }
.mt-sm  { margin-top: var(--spacing-2); }
.mt-md  { margin-top: var(--spacing-4); }
.mt-lg  { margin-top: var(--spacing-6); }
.mt-xl  { margin-top: var(--spacing-8); }

.mb-xs  { margin-bottom: var(--spacing-1); }
.mb-sm  { margin-bottom: var(--spacing-2); }
.mb-md  { margin-bottom: var(--spacing-4); }
.mb-lg  { margin-bottom: var(--spacing-6); }
.mb-xl  { margin-bottom: var(--spacing-8); }

.ml-xs  { margin-left: var(--spacing-1); }
.ml-sm  { margin-left: var(--spacing-2); }
.ml-md  { margin-left: var(--spacing-4); }
.ml-lg  { margin-left: var(--spacing-6); }
.ml-xl  { margin-left: var(--spacing-8); }

.mr-xs  { margin-right: var(--spacing-1); }
.mr-sm  { margin-right: var(--spacing-2); }
.mr-md  { margin-right: var(--spacing-4); }
.mr-lg  { margin-right: var(--spacing-6); }
.mr-xl  { margin-right: var(--spacing-8); }

.mx-xs  { margin-left: var(--spacing-1); margin-right: var(--spacing-1); }
.mx-sm  { margin-left: var(--spacing-2); margin-right: var(--spacing-2); }
.mx-md  { margin-left: var(--spacing-4); margin-right: var(--spacing-4); }
.mx-lg  { margin-left: var(--spacing-6); margin-right: var(--spacing-6); }
.mx-xl  { margin-left: var(--spacing-8); margin-right: var(--spacing-8); }

.my-xs  { margin-top: var(--spacing-1); margin-bottom: var(--spacing-1); }
.my-sm  { margin-top: var(--spacing-2); margin-bottom: var(--spacing-2); }
.my-md  { margin-top: var(--spacing-4); margin-bottom: var(--spacing-4); }
.my-lg  { margin-top: var(--spacing-6); margin-bottom: var(--spacing-6); }
.my-xl  { margin-top: var(--spacing-8); margin-bottom: var(--spacing-8); }

/* Gap */
.gap-xs  { gap: var(--spacing-1); }
.gap-sm  { gap: var(--spacing-2); }
.gap-md  { gap: var(--spacing-4); }
.gap-lg  { gap: var(--spacing-6); }
.gap-xl  { gap: var(--spacing-8); }

/**
 * COEUS DESIGN SYSTEM V2 - SIZING UTILITIES
 *
 * PURPOSE:
 * Responsive width, height, and container sizing
 * Based on Tailwind-style percentage and absolute sizing
 *
 * INCLUDES:
 * - Width (w-*): Percentage, fixed, auto, full, screen
 * - Height (h-*): Percentage, fixed, auto, full, screen
 * - Min/Max Width: Responsive constraints
 * - Min/Max Height: Responsive constraints
 * - Container Max-widths: Responsive breakpoint containers
 *
 * DEPENDENCIES: variables-v2.css
 * VERSION: 2.0.0
 * CREATED: 2025-11-18
 */

/* ============================================ */
/*                    WIDTH                     */
/* ============================================ */

/* Auto and full widths */
.w-auto { width: auto; }
.w-full { width: 100%; }
.w-screen { width: 100vw; }

/* Percentage widths */
.w-1\/2  { width: 50%; }
.w-1\/3  { width: 33.333333%; }
.w-2\/3  { width: 66.666667%; }
.w-1\/4  { width: 25%; }
.w-2\/4  { width: 50%; }
.w-3\/4  { width: 75%; }
.w-1\/5  { width: 20%; }
.w-2\/5  { width: 40%; }
.w-3\/5  { width: 60%; }
.w-4\/5  { width: 80%; }
.w-1\/6  { width: 16.666667%; }
.w-5\/6  { width: 83.333333%; }
.w-1\/12 { width: 8.333333%; }

/* Fixed widths (rem-based for accessibility) */
.w-0  { width: 0; }
.w-1  { width: 0.25rem; }  /* 4px */
.w-2  { width: 0.5rem; }   /* 8px */
.w-3  { width: 0.75rem; }  /* 12px */
.w-4  { width: 1rem; }     /* 16px */
.w-5  { width: 1.25rem; }  /* 20px */
.w-6  { width: 1.5rem; }   /* 24px */
.w-7  { width: 1.75rem; }  /* 28px */
.w-8  { width: 2rem; }     /* 32px */
.w-9  { width: 2.25rem; }  /* 36px */
.w-10 { width: 2.5rem; }   /* 40px */
.w-11 { width: 2.75rem; }  /* 44px */
.w-12 { width: 3rem; }     /* 48px */
.w-14 { width: 3.5rem; }   /* 56px */
.w-16 { width: 4rem; }     /* 64px */
.w-20 { width: 5rem; }     /* 80px */
.w-24 { width: 6rem; }     /* 96px */
.w-28 { width: 7rem; }     /* 112px */
.w-32 { width: 8rem; }     /* 128px */
.w-36 { width: 9rem; }     /* 144px */
.w-40 { width: 10rem; }    /* 160px */
.w-44 { width: 11rem; }    /* 176px */
.w-48 { width: 12rem; }    /* 192px */
.w-52 { width: 13rem; }    /* 208px */
.w-56 { width: 14rem; }    /* 224px */
.w-60 { width: 15rem; }    /* 240px */
.w-64 { width: 16rem; }    /* 256px */
.w-72 { width: 18rem; }    /* 288px */
.w-80 { width: 20rem; }    /* 320px */
.w-96 { width: 24rem; }    /* 384px */

/* ============================================ */
/*                    HEIGHT                    */
/* ============================================ */

/* Auto and full heights */
.h-auto { height: auto; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }

/* Percentage heights */
.h-1\/2  { height: 50%; }
.h-1\/3  { height: 33.333333%; }
.h-2\/3  { height: 66.666667%; }
.h-1\/4  { height: 25%; }
.h-2\/4  { height: 50%; }
.h-3\/4  { height: 75%; }
.h-1\/5  { height: 20%; }
.h-2\/5  { height: 40%; }
.h-3\/5  { height: 60%; }
.h-4\/5  { height: 80%; }
.h-1\/6  { height: 16.666667%; }
.h-5\/6  { height: 83.333333%; }

/* Fixed heights (rem-based) */
.h-0  { height: 0; }
.h-1  { height: 0.25rem; }
.h-2  { height: 0.5rem; }
.h-3  { height: 0.75rem; }
.h-4  { height: 1rem; }
.h-5  { height: 1.25rem; }
.h-6  { height: 1.5rem; }
.h-7  { height: 1.75rem; }
.h-8  { height: 2rem; }
.h-9  { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-24 { height: 6rem; }
.h-28 { height: 7rem; }
.h-32 { height: 8rem; }
.h-36 { height: 9rem; }
.h-40 { height: 10rem; }
.h-44 { height: 11rem; }
.h-48 { height: 12rem; }
.h-52 { height: 13rem; }
.h-56 { height: 14rem; }
.h-60 { height: 15rem; }
.h-64 { height: 16rem; }
.h-72 { height: 18rem; }
.h-80 { height: 20rem; }
.h-96 { height: 24rem; }

/* ============================================ */
/*                  MIN-WIDTH                   */
/* ============================================ */

.min-w-0 { min-width: 0; }
.min-w-full { min-width: 100%; }
.min-w-min { min-width: min-content; }
.min-w-max { min-width: max-content; }
.min-w-fit { min-width: fit-content; }

/* Container-based min-widths */
.min-w-sm  { min-width: var(--container-sm); }   /* 640px */
.min-w-md  { min-width: var(--container-md); }   /* 768px */
.min-w-lg  { min-width: var(--container-lg); }   /* 1024px */
.min-w-xl  { min-width: var(--container-xl); }   /* 1280px */
.min-w-2xl { min-width: var(--container-2xl); }  /* 1536px */

/* ============================================ */
/*                  MAX-WIDTH                   */
/* ============================================ */

.max-w-none { max-width: none; }
.max-w-full { max-width: 100%; }
.max-w-min  { max-width: min-content; }
.max-w-max  { max-width: max-content; }
.max-w-fit  { max-width: fit-content; }

/* Prose widths (for readable text content) */
.max-w-prose { max-width: 65ch; }  /* Optimal reading width */

/* Container-based max-widths (responsive breakpoints) */
.max-w-xs  { max-width: 20rem; }  /* 320px */
.max-w-sm  { max-width: var(--container-sm); }   /* 640px */
.max-w-md  { max-width: var(--container-md); }   /* 768px */
.max-w-lg  { max-width: var(--container-lg); }   /* 1024px */
.max-w-xl  { max-width: var(--container-xl); }   /* 1280px */
.max-w-2xl { max-width: var(--container-2xl); }  /* 1536px */

/* Fixed max-widths for specific UI elements */
.max-w-modal-sm  { max-width: 24rem; }  /* 384px - Small modals */
.max-w-modal-md  { max-width: 32rem; }  /* 512px - Medium modals */
.max-w-modal-lg  { max-width: 48rem; }  /* 768px - Large modals */
.max-w-modal-xl  { max-width: 64rem; }  /* 1024px - XL modals */

/* ============================================ */
/*                  MIN-HEIGHT                  */
/* ============================================ */

.min-h-0 { min-height: 0; }
.min-h-full { min-height: 100%; }
.min-h-screen { min-height: 100vh; }
.min-h-min { min-height: min-content; }
.min-h-max { min-height: max-content; }
.min-h-fit { min-height: fit-content; }

/* Fixed min-heights */
.min-h-10 { min-height: 2.5rem; }   /* 40px */
.min-h-12 { min-height: 3rem; }     /* 48px */
.min-h-16 { min-height: 4rem; }     /* 64px */
.min-h-20 { min-height: 5rem; }     /* 80px */
.min-h-24 { min-height: 6rem; }     /* 96px */
.min-h-32 { min-height: 8rem; }     /* 128px */
.min-h-40 { min-height: 10rem; }    /* 160px */
.min-h-48 { min-height: 12rem; }    /* 192px */
.min-h-64 { min-height: 16rem; }    /* 256px */
.min-h-80 { min-height: 20rem; }    /* 320px */

/* ============================================ */
/*                  MAX-HEIGHT                  */
/* ============================================ */

.max-h-none { max-height: none; }
.max-h-full { max-height: 100%; }
.max-h-screen { max-height: 100vh; }
.max-h-min { max-height: min-content; }
.max-h-max { max-height: max-content; }
.max-h-fit { max-height: fit-content; }

/* Fixed max-heights (useful for scrollable containers) */
.max-h-10 { max-height: 2.5rem; }   /* 40px */
.max-h-12 { max-height: 3rem; }     /* 48px */
.max-h-16 { max-height: 4rem; }     /* 64px */
.max-h-20 { max-height: 5rem; }     /* 80px */
.max-h-24 { max-height: 6rem; }     /* 96px */
.max-h-32 { max-height: 8rem; }     /* 128px */
.max-h-40 { max-height: 10rem; }    /* 160px */
.max-h-48 { max-height: 12rem; }    /* 192px */
.max-h-56 { max-height: 14rem; }    /* 224px */
.max-h-64 { max-height: 16rem; }    /* 256px */
.max-h-72 { max-height: 18rem; }    /* 288px */
.max-h-80 { max-height: 20rem; }    /* 320px */
.max-h-96 { max-height: 24rem; }    /* 384px */

/* ============================================ */
/*             OBJECT FIT & POSITION            */
/* ============================================ */

.object-contain { object-fit: contain; }
.object-cover   { object-fit: cover; }
.object-fill    { object-fit: fill; }
.object-none    { object-fit: none; }
.object-scale-down { object-fit: scale-down; }

.object-center  { object-position: center; }
.object-top     { object-position: top; }
.object-right   { object-position: right; }
.object-bottom  { object-position: bottom; }
.object-left    { object-position: left; }

/* ============================================ */
/*                ASPECT RATIO                  */
/* ============================================ */

.aspect-auto   { aspect-ratio: auto; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video  { aspect-ratio: 16 / 9; }
.aspect-4\/3   { aspect-ratio: 4 / 3; }
.aspect-3\/2   { aspect-ratio: 3 / 2; }
.aspect-21\/9  { aspect-ratio: 21 / 9; }

/* ============================================ */
/*             CONTAINER UTILITIES              */
/* ============================================ */

/**
 * Responsive container with auto horizontal margins
 * Centers content and constrains width at breakpoints
 */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-4);
  padding-right: var(--spacing-4);
}

/* Responsive container max-widths */
@media (min-width: 30em) {  /* sm: 480px */
  .container {
    max-width: var(--container-sm);
  }
}

@media (min-width: 48em) {  /* md: 768px */
  .container {
    max-width: var(--container-md);
  }
}

@media (min-width: 64em) {  /* lg: 1024px */
  .container {
    max-width: var(--container-lg);
  }
}

@media (min-width: 80em) {  /* xl: 1280px */
  .container {
    max-width: var(--container-xl);
  }
}

@media (min-width: 96em) {  /* 2xl: 1536px */
  .container {
    max-width: var(--container-2xl);
  }
}

/**
 * COEUS DESIGN SYSTEM V2 - LAYOUT UTILITIES
 *
 * PURPOSE:
 * Flexbox and Grid layout utilities
 * Consolidates flexbox.css and layout.css into single file
 *
 * INCLUDES:
 * - Flexbox utilities (display, direction, wrap, alignment)
 * - Grid utilities (columns, rows, placement)
 * - Common layout patterns (center, between, around)
 * - Positioning utilities (relative, absolute, fixed, sticky)
 * - Width utilities (w-4 through w-64, w-full, max-w-*, min-w-*)
 * - Height utilities (h-4 through h-64, h-full, max-h-*, min-h-*)
 *
 * DEPENDENCIES: None
 * VERSION: 2.1.0
 * CREATED: 2025-11-18
 * UPDATED: 2026-01-25 - Added width/height utility classes
 */

/* ============================================ */
/*                   DISPLAY                    */
/* ============================================ */

.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.inline-grid { display: inline-grid; }
.hidden { display: none; }

/* ============================================ */
/*              FLEX DIRECTION                  */
/* ============================================ */

.flex-row { flex-direction: row; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-col { flex-direction: column; }
.flex-col-reverse { flex-direction: column-reverse; }

/* ============================================ */
/*                 FLEX WRAP                    */
/* ============================================ */

.flex-wrap { flex-wrap: wrap; }
.flex-wrap-reverse { flex-wrap: wrap-reverse; }
.flex-nowrap { flex-wrap: nowrap; }

/* ============================================ */
/*               FLEX GROW / SHRINK             */
/* ============================================ */

.flex-1 { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-initial { flex: 0 1 auto; }
.flex-none { flex: none; }

.flex-grow-0 { flex-grow: 0; }
.flex-grow { flex-grow: 1; }

.flex-shrink-0 { flex-shrink: 0; }
.flex-shrink { flex-shrink: 1; }

/* ============================================ */
/*            JUSTIFY CONTENT (Main Axis)       */
/* ============================================ */

.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }
.justify-stretch { justify-content: stretch; }

/* ============================================ */
/*            ALIGN ITEMS (Cross Axis)          */
/* ============================================ */

.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }

/* ============================================ */
/*              ALIGN CONTENT                   */
/* ============================================ */

.content-start { align-content: flex-start; }
.content-end { align-content: flex-end; }
.content-center { align-content: center; }
.content-between { align-content: space-between; }
.content-around { align-content: space-around; }
.content-evenly { align-content: space-evenly; }
.content-stretch { align-content: stretch; }

/* ============================================ */
/*                ALIGN SELF                    */
/* ============================================ */

.self-auto { align-self: auto; }
.self-start { align-self: flex-start; }
.self-end { align-self: flex-end; }
.self-center { align-self: center; }
.self-stretch { align-self: stretch; }
.self-baseline { align-self: baseline; }

/* ============================================ */
/*            COMMON FLEX PATTERNS              */
/* ============================================ */

/* Horizontal center (main and cross axis) */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Space between with vertical center */
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Flex start with vertical center */
.flex-start {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Flex end with vertical center */
.flex-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ============================================ */
/*              GRID TEMPLATE COLUMNS           */
/* ============================================ */

.grid-cols-1  { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5  { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6  { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-cols-7  { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.grid-cols-8  { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.grid-cols-9  { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.grid-cols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.grid-cols-none { grid-template-columns: none; }

/* ============================================ */
/*              GRID TEMPLATE ROWS              */
/* ============================================ */

.grid-rows-1  { grid-template-rows: repeat(1, minmax(0, 1fr)); }
.grid-rows-2  { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.grid-rows-3  { grid-template-rows: repeat(3, minmax(0, 1fr)); }
.grid-rows-4  { grid-template-rows: repeat(4, minmax(0, 1fr)); }
.grid-rows-5  { grid-template-rows: repeat(5, minmax(0, 1fr)); }
.grid-rows-6  { grid-template-rows: repeat(6, minmax(0, 1fr)); }

.grid-rows-none { grid-template-rows: none; }

/* ============================================ */
/*              GRID AUTO FLOW                  */
/* ============================================ */

.grid-flow-row { grid-auto-flow: row; }
.grid-flow-col { grid-auto-flow: column; }
.grid-flow-row-dense { grid-auto-flow: row dense; }
.grid-flow-col-dense { grid-auto-flow: column dense; }

/* ============================================ */
/*            GRID AUTO COLUMNS / ROWS          */
/* ============================================ */

.auto-cols-auto { grid-auto-columns: auto; }
.auto-cols-min  { grid-auto-columns: min-content; }
.auto-cols-max  { grid-auto-columns: max-content; }
.auto-cols-fr   { grid-auto-columns: minmax(0, 1fr); }

.auto-rows-auto { grid-auto-rows: auto; }
.auto-rows-min  { grid-auto-rows: min-content; }
.auto-rows-max  { grid-auto-rows: max-content; }
.auto-rows-fr   { grid-auto-rows: minmax(0, 1fr)); }

/* ============================================ */
/*              GRID COLUMN SPAN                */
/* ============================================ */

.col-auto { grid-column: auto; }
.col-span-1  { grid-column: span 1 / span 1; }
.col-span-2  { grid-column: span 2 / span 2; }
.col-span-3  { grid-column: span 3 / span 3; }
.col-span-4  { grid-column: span 4 / span 4; }
.col-span-5  { grid-column: span 5 / span 5; }
.col-span-6  { grid-column: span 6 / span 6; }
.col-span-7  { grid-column: span 7 / span 7; }
.col-span-8  { grid-column: span 8 / span 8; }
.col-span-9  { grid-column: span 9 / span 9; }
.col-span-10 { grid-column: span 10 / span 10; }
.col-span-11 { grid-column: span 11 / span 11; }
.col-span-12 { grid-column: span 12 / span 12; }
.col-span-full { grid-column: 1 / -1; }

/* Grid column start/end */
.col-start-1  { grid-column-start: 1; }
.col-start-2  { grid-column-start: 2; }
.col-start-3  { grid-column-start: 3; }
.col-start-4  { grid-column-start: 4; }
.col-start-5  { grid-column-start: 5; }
.col-start-6  { grid-column-start: 6; }
.col-start-7  { grid-column-start: 7; }
.col-start-auto { grid-column-start: auto; }

.col-end-1  { grid-column-end: 1; }
.col-end-2  { grid-column-end: 2; }
.col-end-3  { grid-column-end: 3; }
.col-end-4  { grid-column-end: 4; }
.col-end-5  { grid-column-end: 5; }
.col-end-6  { grid-column-end: 6; }
.col-end-7  { grid-column-end: 7; }
.col-end-auto { grid-column-end: auto; }

/* ============================================ */
/*                GRID ROW SPAN                 */
/* ============================================ */

.row-auto { grid-row: auto; }
.row-span-1  { grid-row: span 1 / span 1; }
.row-span-2  { grid-row: span 2 / span 2; }
.row-span-3  { grid-row: span 3 / span 3; }
.row-span-4  { grid-row: span 4 / span 4; }
.row-span-5  { grid-row: span 5 / span 5; }
.row-span-6  { grid-row: span 6 / span 6; }
.row-span-full { grid-row: 1 / -1; }

/* Grid row start/end */
.row-start-1  { grid-row-start: 1; }
.row-start-2  { grid-row-start: 2; }
.row-start-3  { grid-row-start: 3; }
.row-start-4  { grid-row-start: 4; }
.row-start-auto { grid-row-start: auto; }

.row-end-1  { grid-row-end: 1; }
.row-end-2  { grid-row-end: 2; }
.row-end-3  { grid-row-end: 3; }
.row-end-4  { grid-row-end: 4; }
.row-end-auto { grid-row-end: auto; }

/* ============================================ */
/*                 PLACE CONTENT                */
/* ============================================ */

.place-content-center  { place-content: center; }
.place-content-start   { place-content: start; }
.place-content-end     { place-content: end; }
.place-content-between { place-content: space-between; }
.place-content-around  { place-content: space-around; }
.place-content-evenly  { place-content: space-evenly; }
.place-content-stretch { place-content: stretch; }

/* ============================================ */
/*                  PLACE ITEMS                 */
/* ============================================ */

.place-items-start    { place-items: start; }
.place-items-end      { place-items: end; }
.place-items-center   { place-items: center; }
.place-items-stretch  { place-items: stretch; }

/* ============================================ */
/*                  PLACE SELF                  */
/* ============================================ */

.place-self-auto    { place-self: auto; }
.place-self-start   { place-self: start; }
.place-self-end     { place-self: end; }
.place-self-center  { place-self: center; }
.place-self-stretch { place-self: stretch; }

/* ============================================ */
/*                  POSITIONING                 */
/* ============================================ */

.static { position: static; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.sticky { position: sticky; }

/* ============================================ */
/*              POSITION UTILITIES              */
/* ============================================ */

/* Inset (all sides) */
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.inset-auto { top: auto; right: auto; bottom: auto; left: auto; }

/* Inset X (horizontal) */
.inset-x-0 { left: 0; right: 0; }
.inset-x-auto { left: auto; right: auto; }

/* Inset Y (vertical) */
.inset-y-0 { top: 0; bottom: 0; }
.inset-y-auto { top: auto; bottom: auto; }

/* Individual sides */
.top-0 { top: 0; }
.top-auto { top: auto; }
.right-0 { right: 0; }
.right-auto { right: auto; }
.bottom-0 { bottom: 0; }
.bottom-auto { bottom: auto; }
.left-0 { left: 0; }
.left-auto { left: auto; }

/* Common positioning patterns */
.top-1\/2 { top: 50%; }
.left-1\/2 { left: 50%; }
.top-full { top: 100%; }
.left-full { left: 100%; }

/* ============================================ */
/*              WIDTH UTILITIES                 */
/* ============================================ */

/* Fixed widths (rem-based for consistency) */
.w-4  { width: 1rem; }      /* 16px */
.w-5  { width: 1.25rem; }   /* 20px */
.w-6  { width: 1.5rem; }    /* 24px */
.w-8  { width: 2rem; }      /* 32px */
.w-10 { width: 2.5rem; }    /* 40px */
.w-12 { width: 3rem; }      /* 48px */
.w-16 { width: 4rem; }      /* 64px */
.w-20 { width: 5rem; }      /* 80px */
.w-24 { width: 6rem; }      /* 96px */
.w-32 { width: 8rem; }      /* 128px */
.w-40 { width: 10rem; }     /* 160px */
.w-48 { width: 12rem; }     /* 192px */
.w-56 { width: 14rem; }     /* 224px */
.w-64 { width: 16rem; }     /* 256px */

/* Percentage widths */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-1\/2 { width: 50%; }
.w-1\/3 { width: 33.333333%; }
.w-2\/3 { width: 66.666667%; }
.w-1\/4 { width: 25%; }
.w-3\/4 { width: 75%; }
.w-screen { width: 100vw; }

/* Max-width utilities */
.max-w-xs   { max-width: 20rem; }    /* 320px */
.max-w-sm   { max-width: 24rem; }    /* 384px */
.max-w-md   { max-width: 28rem; }    /* 448px */
.max-w-lg   { max-width: 32rem; }    /* 512px */
.max-w-xl   { max-width: 36rem; }    /* 576px */
.max-w-2xl  { max-width: 42rem; }    /* 672px */
.max-w-3xl  { max-width: 48rem; }    /* 768px */
.max-w-4xl  { max-width: 56rem; }    /* 896px */
.max-w-5xl  { max-width: 64rem; }    /* 1024px */
.max-w-6xl  { max-width: 72rem; }    /* 1152px */
.max-w-7xl  { max-width: 80rem; }    /* 1280px */
.max-w-full { max-width: 100%; }
.max-w-none { max-width: none; }

/* Min-width utilities */
.min-w-0    { min-width: 0; }
.min-w-full { min-width: 100%; }

/* ============================================ */
/*              HEIGHT UTILITIES                */
/* ============================================ */

/* Fixed heights (rem-based for consistency) */
.h-4  { height: 1rem; }      /* 16px */
.h-5  { height: 1.25rem; }   /* 20px */
.h-6  { height: 1.5rem; }    /* 24px */
.h-8  { height: 2rem; }      /* 32px */
.h-10 { height: 2.5rem; }    /* 40px */
.h-12 { height: 3rem; }      /* 48px */
.h-16 { height: 4rem; }      /* 64px */
.h-20 { height: 5rem; }      /* 80px */
.h-24 { height: 6rem; }      /* 96px */
.h-32 { height: 8rem; }      /* 128px */
.h-40 { height: 10rem; }     /* 160px */
.h-48 { height: 12rem; }     /* 192px */
.h-56 { height: 14rem; }     /* 224px */
.h-64 { height: 16rem; }     /* 256px */

/* Standard heights */
.h-auto { height: auto; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }

/* Max-height utilities */
.max-h-full   { max-height: 100%; }
.max-h-screen { max-height: 100vh; }
.max-h-32     { max-height: 8rem; }
.max-h-48     { max-height: 12rem; }
.max-h-64     { max-height: 16rem; }
.max-h-96     { max-height: 24rem; }

/* Min-height utilities */
.min-h-0      { min-height: 0; }
.min-h-full   { min-height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Dynamic Viewport Height (Fixes mobile browser UI issues) */
.h-dvh { height: 100dvh; }
.min-h-dvh { min-height: 100dvh; }
.max-h-dvh { max-height: 100dvh; }

/* Fallbacks for older browsers */
@supports not (height: 100dvh) {
  .h-dvh { height: 100vh; }
  .min-h-dvh { min-height: 100vh; }
  .max-h-dvh { max-height: 100vh; }
}

/* ============================================ */
/*                    ORDER                     */
/* ============================================ */

.order-1 { order: 1; }
.order-2 { order: 2; }
.order-3 { order: 3; }
.order-4 { order: 4; }
.order-5 { order: 5; }
.order-6 { order: 6; }
.order-first { order: -9999; }
.order-last { order: 9999; }
.order-none { order: 0; }

/* ============================================ */
/*                    Z-INDEX                   */
/* ============================================ */

.z-0  { z-index: 0; }
.z-10 { z-index: var(--z-dropdown); }
.z-20 { z-index: var(--z-sticky); }
.z-30 { z-index: var(--z-fixed); }
.z-40 { z-index: var(--z-modal-backdrop); }
.z-50 { z-index: var(--z-modal); }
.z-60 { z-index: var(--z-popover); }
.z-70 { z-index: var(--z-toast); }
.z-80 { z-index: var(--z-tooltip); }
.z-auto { z-index: auto; }

/* Legacy aliases */
.z-base           { z-index: var(--z-base); }
.z-dropdown       { z-index: var(--z-dropdown); }
.z-sticky         { z-index: var(--z-sticky); }
.z-fixed          { z-index: var(--z-fixed); }
.z-modal-backdrop { z-index: var(--z-modal-backdrop); }
.z-modal          { z-index: var(--z-modal); }
.z-popover        { z-index: var(--z-popover); }
.z-toast          { z-index: var(--z-toast); }
.z-tooltip        { z-index: var(--z-tooltip); }

/* ============================================ */
/*                  OVERFLOW                    */
/* ============================================ */

.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll { overflow: scroll; }

.overflow-x-auto { overflow-x: auto; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-x-visible { overflow-x: visible; }
.overflow-x-scroll { overflow-x: scroll; }

.overflow-y-auto { overflow-y: auto; }
.overflow-y-hidden { overflow-y: hidden; }
.overflow-y-visible { overflow-y: visible; }
.overflow-y-scroll { overflow-y: scroll; }

/* ============================================ */
/*                 VISIBILITY                   */
/* ============================================ */

.visible { visibility: visible; }
.invisible { visibility: hidden; }
.collapse { visibility: collapse; }

/**
 * COEUS DESIGN SYSTEM V2 - HELPER UTILITIES
 *
 * PURPOSE:
 * Miscellaneous utility classes for common patterns
 * Consolidates cleanup classes and one-off utilities
 *
 * INCLUDES:
 * - Text utilities (color, style, transformation)
 * - Border utilities (accents, colors)
 * - Badge utilities (colored pills)
 * - Icon utilities (sizing, spacing)
 * - State utilities (disabled, hover, focus)
 * - Flex utilities (specific patterns)
 *
 * DEPENDENCIES: variables-v2.css, themes-v2.css
 * VERSION: 2.0.0
 * CREATED: 2025-11-18
 */

/* ============================================ */
/*                TEXT UTILITIES                */
/* ============================================ */

/* Text colors (theme-aware) */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }

/* iOS system colors */
.text-blue   { color: var(--ios-system-orange); }
.text-green  { color: var(--ios-system-green); }
.text-orange { color: var(--ios-system-orange); }
.text-red    { color: var(--ios-system-red); }
.text-indigo { color: var(--ios-system-indigo); }
.text-purple { color: var(--ios-system-purple); }
.text-pink   { color: var(--ios-system-pink); }
.text-teal   { color: var(--ios-system-teal); }
.text-yellow { color: var(--ios-system-yellow); }

/* Text styles */
.text-muted-italic {
  font-style: italic;
  color: #9ca3af;
}

.empty-state-text {
  color: #9ca3af;
  font-style: italic;
  font-size: 1em;
}

.text-error-message {
  color: #ef4444;
  font-style: italic;
}

/* Text alignment */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-justify { text-align: justify; }

/* Text transformation */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* Text decoration */
.underline { text-decoration: underline; }
.line-through { text-decoration: line-through; }
.no-underline { text-decoration: none; }

/* ============================================ */
/*              BORDER UTILITIES                */
/* ============================================ */

/* Border width */
.border-0 { border-width: 0; }
.border   { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-4 { border-width: 4px; }

/* Border sides */
.border-t   { border-top-width: 1px; }
.border-r   { border-right-width: 1px; }
.border-b   { border-bottom-width: 1px; }
.border-l   { border-left-width: 1px; }

/* Border left accents (3px colored stripes) */
.border-left-danger {
  border-left: 3px solid var(--ios-system-red);
}

.border-left-primary {
  border-left: 3px solid var(--ios-system-orange);
}

.border-left-success {
  border-left: 3px solid var(--ios-system-green);
}

.border-left-warning {
  border-left: 3px solid var(--ios-system-orange);
}

/* Border radius */
.rounded-none { border-radius: 0; }
.rounded-sm   { border-radius: var(--radius-sm); }
.rounded-md   { border-radius: var(--radius-md); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-xl   { border-radius: var(--radius-xl); }
.rounded-2xl  { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ============================================ */
/*               BADGE UTILITIES                */
/* ============================================ */

/* Base badge styles */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Colored badge variants */
.badge-indigo {
  padding: 0.25rem 0.75rem;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-purple {
  padding: 0.25rem 0.75rem;
  background: #ddd6fe;
  color: #6b21a8;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-pink {
  padding: 0.25rem 0.75rem;
  background: #fce7f3;
  color: #a21caf;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-doctype {
  display: inline-block;
  background: var(--ios-system-orange, #f97316);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ============================================ */
/*                ICON UTILITIES                */
/* ============================================ */

/* Icon spacing (margin-right for inline icons) */
.icon-spacing {
  margin-right: 0.25rem;
}

/* Icon sizes */
.icon-xs { width: 1rem; height: 1rem; }     /* 16px */
.icon-sm { width: 1.25rem; height: 1.25rem; } /* 20px */
.icon-md { width: 1.5rem; height: 1.5rem; }   /* 24px */
.icon-lg { width: 2rem; height: 2rem; }       /* 32px */
.icon-xl { width: 2.5rem; height: 2.5rem; }   /* 40px */
.icon-large { font-size: 3rem; }               /* 48px - for placeholders */

/* Inline icon (with vertical alignment) */
.inline-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.25em;
}

/* Empty state icon (centered, faded) */
.empty-state-icon {
  margin: 0 auto 1rem;
  opacity: 0.3;
}

/* ============================================ */
/*               FLEX UTILITIES                 */
/* ============================================ */

/* Flex grow variants */
.flex-2 {
  flex: 2;
}

.flex-3 {
  flex: 3;
}

/* Fixed flex basis */
.flex-fixed-70 {
  flex: 0 0 70px;
}

.flex-fixed-100 {
  flex: 0 0 100px;
}

/* Flex column with rounded corners */
.flex-col-rounded {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
}

/* Centered flex container (full width/height) */
.flex-center-full {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* ============================================ */
/*               STATE UTILITIES                */
/* ============================================ */

/* Disabled state */
.disabled-card,
.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Pointer events */
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* Cursor utilities */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-wait { cursor: wait; }

/* User select */
.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all  { user-select: all; }
.select-auto { user-select: auto; }

/* ============================================ */
/*              BACKGROUND UTILITIES            */
/* ============================================ */

/* Transparent background */
.bg-transparent { background-color: transparent; }

/* Theme backgrounds */
.bg-primary   { background-color: var(--background-primary); }
.bg-secondary { background-color: var(--background-secondary); }
.bg-hover     { background-color: var(--background-hover); }

/* iOS system color backgrounds */
.bg-blue   { background-color: var(--ios-system-orange); }
.bg-green  { background-color: var(--ios-system-green); }
.bg-orange { background-color: var(--ios-system-orange); }
.bg-red    { background-color: var(--ios-system-red); }
.bg-indigo { background-color: var(--ios-system-indigo); }
.bg-purple { background-color: var(--ios-system-purple); }

/* ============================================ */
/*             OPACITY UTILITIES                */
/* ============================================ */

.opacity-0   { opacity: 0; }
.opacity-25  { opacity: 0.25; }
.opacity-30  { opacity: 0.3; }
.opacity-50  { opacity: 0.5; }
.opacity-75  { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* ============================================ */
/*           TRANSITION UTILITIES               */
/* ============================================ */

.transition-none { transition: none; }
.transition-all  { transition: all var(--transition-base); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }
.transition-smooth { transition: all var(--transition-smooth); }
.transition-bounce { transition: all var(--transition-bounce); }
.transition-transform { transition: transform 0.2s ease; }

/* ============================================ */
/*             TRANSFORM UTILITIES              */
/* ============================================ */

.rotate-0   { transform: rotate(0deg); }
.rotate-45  { transform: rotate(45deg); }
.rotate-90  { transform: rotate(90deg); }
.rotate-180 { transform: rotate(180deg); }
.-rotate-90 { transform: rotate(-90deg); }

/* Chevron rotation for collapsible elements */
.chevron-collapse {
    transition: transform 0.2s ease;
}
.chevron-collapse.rotate-90 {
    transform: rotate(90deg);
}

/* ============================================ */
/*              SHADOW UTILITIES                */
/* ============================================ */

.shadow-none { box-shadow: var(--shadow-none); }
.shadow-xs   { box-shadow: var(--shadow-xs); }
.shadow-sm   { box-shadow: var(--shadow-sm); }
.shadow-md   { box-shadow: var(--shadow-md); }
.shadow-lg   { box-shadow: var(--shadow-lg); }
.shadow-xl   { box-shadow: var(--shadow-xl); }
.shadow-2xl  { box-shadow: var(--shadow-2xl); }

/* ============================================ */
/*          COMPONENT-SPECIFIC PATTERNS         */
/* ============================================ */

/* View toggle container (for view switchers) */
.view-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem;
  background: var(--glass-primary);
  border-radius: 0.5rem;
}

/* Top-right controls positioning */
.top-right-controls {
  top: 1.25em;    /* 20px responsive */
  right: 1.25em;  /* 20px responsive */
}

/* Modal max-widths */
.modal-sm { max-width: 400px; }
.modal-md { max-width: 600px; }
.modal-lg { max-width: 900px; }
.modal-xl { max-width: 1200px; }

/* Image cover (full size with rounded corners) */
.image-cover-full {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Amount indicators (financial) */
.amount-negative {
  color: var(--ios-system-red);
}

.amount-positive {
  color: var(--ios-system-green);
}

/* Progress bar fill (animated gradient) */
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ios-system-orange, #f97316), #fb923c);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Progress container */
.progress-container {
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

/* Summary card components */
.summary-card {
  background: var(--glass-primary);
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 3px solid var(--ios-system-orange, #f97316);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.summary-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.summary-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #1e40af;
  margin-right: 0.5rem;
}

.summary-text-primary {
  margin: 0;
  font-weight: 600;
  color: #1e40af;
  font-size: 0.875rem;
}

.summary-content {
  color: #374151;
  line-height: 1.6;
  font-size: 0.875rem;
  white-space: pre-wrap;
}

.summary-divider {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
}

/* Section heading */
.section-heading {
  margin-bottom: 1rem;
}

/* Tool card CTA badge */
.tool-card-cta {
  background: linear-gradient(to right, #f97316, #ef4444);
  color: white;
}

/* ============================================ */
/*             RESPONSIVE UTILITIES             */
/* ============================================ */

/* Breakpoint visibility helpers */
@media (max-width: 48em) {  /* Hide on small screens */
  .hide-sm { display: none !important; }
}

@media (min-width: 48em) {  /* Hide on medium+ screens */
  .show-sm { display: none !important; }
}

@media (max-width: 64em) {  /* Hide on medium screens */
  .hide-md { display: none !important; }
}

@media (min-width: 64em) {  /* Hide on large+ screens */
  .show-md { display: none !important; }
}

/* ============================================ */
/*              ACCESSIBILITY                   */
/* ============================================ */

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible (keyboard navigation) */
.focus-visible:focus-visible {
  outline: 2px solid var(--ios-system-orange);
  outline-offset: 2px;
}

/* ============================================ */
/*             MISCELLANEOUS                    */
/* ============================================ */

/* Truncate text */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Line clamp (multiline truncate) */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Whitespace */
.whitespace-normal   { white-space: normal; }
.whitespace-nowrap   { white-space: nowrap; }
.whitespace-pre      { white-space: pre; }
.whitespace-pre-line { white-space: pre-line; }
.whitespace-pre-wrap { white-space: pre-wrap; }

/* Break words */
.break-normal { word-break: normal; overflow-wrap: normal; }
.break-words  { overflow-wrap: break-word; }
.break-all    { word-break: break-all; }

/**
 * COEUS Design System - Color Utilities
 * =====================================
 * Signal colors, gradients, category colors, and theme-aware utilities
 *
 * Dependencies: core/variables-v2.css (for CSS custom properties)
 *
 * Sections:
 * 1. Signal Text Colors (success, error, warning, info)
 * 2. Signal Background Colors (subtle tints)
 * 3. Financial Colors (gain/loss indicators)
 * 4. Progress/Quota Gradients
 * 5. Avatar Gradients
 * 6. Category Badge Colors (vendors)
 * 7. Dark Theme Overrides
 */

/* ============================================
   1. SIGNAL TEXT COLORS
   ============================================ */

.text-success {
  color: var(--ios-system-green);
}

.text-error {
  color: var(--ios-system-red);
}

.text-warning {
  color: var(--ios-system-orange);
}

.text-info {
  color: var(--ios-system-orange);
}

.text-purple {
  color: var(--ios-system-purple);
}

.text-indigo {
  color: var(--ios-system-indigo);
}

.text-pink {
  color: var(--ios-system-pink);
}

.text-teal {
  color: var(--ios-system-teal);
}

.text-yellow {
  color: var(--ios-system-yellow);
}

/* ============================================
   2. SIGNAL BACKGROUND COLORS (Subtle Tints)
   ============================================ */

.bg-success-subtle {
  background: rgba(52, 199, 89, 0.1);
}

.bg-error-subtle {
  background: rgba(255, 59, 48, 0.1);
}

.bg-warning-subtle {
  background: rgba(255, 149, 0, 0.1);
}

.bg-info-subtle {
  background: rgba(255, 149, 0, 0.1);
}

.bg-purple-subtle {
  background: rgba(175, 82, 222, 0.1);
}

.bg-indigo-subtle {
  background: rgba(88, 86, 214, 0.1);
}

.bg-pink-subtle {
  background: rgba(255, 45, 146, 0.1);
}

.bg-teal-subtle {
  background: rgba(90, 200, 250, 0.1);
}

.bg-yellow-subtle {
  background: rgba(255, 204, 0, 0.1);
}

/* Dark theme adjustments for subtle backgrounds */
[data-theme="dark"] .bg-success-subtle,
[data-theme="darkart"] .bg-success-subtle,
[data-theme="darkmodern"] .bg-success-subtle {
  background: rgba(48, 209, 88, 0.15);
}

[data-theme="dark"] .bg-error-subtle,
[data-theme="darkart"] .bg-error-subtle,
[data-theme="darkmodern"] .bg-error-subtle {
  background: rgba(255, 69, 58, 0.15);
}

[data-theme="dark"] .bg-warning-subtle,
[data-theme="darkart"] .bg-warning-subtle,
[data-theme="darkmodern"] .bg-warning-subtle {
  background: rgba(255, 159, 10, 0.15);
}

[data-theme="dark"] .bg-info-subtle,
[data-theme="darkart"] .bg-info-subtle,
[data-theme="darkmodern"] .bg-info-subtle {
  background: rgba(10, 132, 255, 0.15);
}

/* ============================================
   3. FINANCIAL COLORS (Gain/Loss)
   ============================================ */

.text-gain {
  color: var(--ios-system-green);
}

.text-loss {
  color: var(--ios-system-red);
}

.text-neutral {
  color: var(--text-secondary);
}

/* Financial backgrounds */
.bg-gain {
  background: rgba(52, 199, 89, 0.12);
  color: var(--ios-system-green);
}

.bg-loss {
  background: rgba(255, 59, 48, 0.12);
  color: var(--ios-system-red);
}

[data-theme="dark"] .bg-gain,
[data-theme="darkart"] .bg-gain,
[data-theme="darkmodern"] .bg-gain {
  background: rgba(48, 209, 88, 0.18);
}

[data-theme="dark"] .bg-loss,
[data-theme="darkart"] .bg-loss,
[data-theme="darkmodern"] .bg-loss {
  background: rgba(255, 69, 58, 0.18);
}

/* ============================================
   4. PROGRESS/QUOTA GRADIENTS
   ============================================ */

.gradient-purple {
  background: linear-gradient(90deg, #8b5cf6, #6366f1);
}

.gradient-emerald {
  background: linear-gradient(90deg, #10b981, #059669);
}

.gradient-amber {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.gradient-rose {
  background: linear-gradient(90deg, #f43f5e, #e11d48);
}

.gradient-blue {
  background: linear-gradient(90deg, #FF9500, #E8870A);
}

.gradient-teal {
  background: linear-gradient(90deg, #14b8a6, #0d9488);
}

.gradient-orange {
  background: linear-gradient(135deg, #f97316, #fb923c);
}

.gradient-indigo {
  background: linear-gradient(90deg, #6366f1, #4f46e5);
}

/* Progress bar base styles */
.progress-bar {
  height: 0.5em;
  border-radius: 0.25em;
  overflow: hidden;
}

.progress-bar-track {
  background: var(--glass-primary);
  height: 100%;
  border-radius: inherit;
}

.progress-bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.3s ease;
}

/* ============================================
   5. AVATAR GRADIENTS
   ============================================ */

.avatar-user {
  background: linear-gradient(135deg, #FF9500, #8b5cf6);
  color: white;
}

.avatar-ai {
  background: linear-gradient(135deg, #10b981, #14b8a6);
  color: white;
}

.avatar-admin {
  background: linear-gradient(135deg, #e91e63, #9c27b0);
  color: white;
}

.avatar-system {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
}

.avatar-support {
  background: linear-gradient(135deg, #f97316, #f59e0b);
  color: white;
}

/* ============================================
   6. CATEGORY BADGE COLORS (Vendors)
   ============================================ */

/* Light theme category badges */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25em 0.75em;
  border-radius: 9999px;
  font-size: 0.8125em;
  font-weight: 500;
  transition: all 0.2s ease;
}

.category-maintenance {
  background: #FEE2E2;
  color: #991B1B;
}

.category-cleaning {
  background: #DBEAFE;
  color: #1E40AF;
}

.category-security {
  background: #FEF3C7;
  color: #92400E;
}

.category-utilities {
  background: #D1FAE5;
  color: #065F46;
}

.category-construction {
  background: #FED7E2;
  color: #9F1239;
}

.category-legal {
  background: #E9D5FF;
  color: #6B21A8;
}

.category-accounting {
  background: #FEF3C7;
  color: #78350F;
}

.category-other {
  background: #E5E7EB;
  color: #374151;
}

/* Insurance, real estate, etc. */
.category-insurance {
  background: #CFFAFE;
  color: #155E75;
}

.category-realestate {
  background: #FCE7F3;
  color: #9D174D;
}

.category-finance {
  background: #ECFDF5;
  color: #065F46;
}

.category-technical {
  background: #EEF2FF;
  color: #3730A3;
}

/* ============================================
   7. DARK THEME OVERRIDES FOR CATEGORIES
   ============================================ */

[data-theme="dark"] .category-maintenance,
[data-theme="darkart"] .category-maintenance,
[data-theme="darkmodern"] .category-maintenance {
  background: rgba(254, 226, 226, 0.15);
  color: #fca5a5;
}

[data-theme="dark"] .category-cleaning,
[data-theme="darkart"] .category-cleaning,
[data-theme="darkmodern"] .category-cleaning {
  background: rgba(219, 234, 254, 0.15);
  color: #93c5fd;
}

[data-theme="dark"] .category-security,
[data-theme="darkart"] .category-security,
[data-theme="darkmodern"] .category-security {
  background: rgba(254, 243, 199, 0.15);
  color: #fcd34d;
}

[data-theme="dark"] .category-utilities,
[data-theme="darkart"] .category-utilities,
[data-theme="darkmodern"] .category-utilities {
  background: rgba(209, 250, 229, 0.15);
  color: #6ee7b7;
}

[data-theme="dark"] .category-construction,
[data-theme="darkart"] .category-construction,
[data-theme="darkmodern"] .category-construction {
  background: rgba(254, 215, 226, 0.15);
  color: #fda4af;
}

[data-theme="dark"] .category-legal,
[data-theme="darkart"] .category-legal,
[data-theme="darkmodern"] .category-legal {
  background: rgba(233, 213, 255, 0.15);
  color: #c4b5fd;
}

[data-theme="dark"] .category-accounting,
[data-theme="darkart"] .category-accounting,
[data-theme="darkmodern"] .category-accounting {
  background: rgba(254, 243, 199, 0.15);
  color: #fbbf24;
}

[data-theme="dark"] .category-other,
[data-theme="darkart"] .category-other,
[data-theme="darkmodern"] .category-other {
  background: rgba(229, 231, 235, 0.15);
  color: #9ca3af;
}

[data-theme="dark"] .category-insurance,
[data-theme="darkart"] .category-insurance,
[data-theme="darkmodern"] .category-insurance {
  background: rgba(207, 250, 254, 0.15);
  color: #67e8f9;
}

[data-theme="dark"] .category-realestate,
[data-theme="darkart"] .category-realestate,
[data-theme="darkmodern"] .category-realestate {
  background: rgba(252, 231, 243, 0.15);
  color: #f9a8d4;
}

[data-theme="dark"] .category-finance,
[data-theme="darkart"] .category-finance,
[data-theme="darkmodern"] .category-finance {
  background: rgba(236, 253, 245, 0.15);
  color: #6ee7b7;
}

[data-theme="dark"] .category-technical,
[data-theme="darkart"] .category-technical,
[data-theme="darkmodern"] .category-technical {
  background: rgba(238, 242, 255, 0.15);
  color: #a5b4fc;
}

/* Custom/Unknown categories fallback - uses CSS custom properties */
.category-badge[data-category]:not(.category-maintenance):not(.category-cleaning):not(.category-security):not(.category-utilities):not(.category-construction):not(.category-legal):not(.category-accounting):not(.category-other):not(.category-insurance):not(.category-realestate):not(.category-finance):not(.category-technical) {
  /* Fallback to a neutral gray - same as .category-other */
  background: #E5E7EB;
  color: #374151;
}

[data-theme="dark"] .category-badge[data-category]:not(.category-maintenance):not(.category-cleaning):not(.category-security):not(.category-utilities):not(.category-construction):not(.category-legal):not(.category-accounting):not(.category-other):not(.category-insurance):not(.category-realestate):not(.category-finance):not(.category-technical),
[data-theme="darkart"] .category-badge[data-category]:not(.category-maintenance):not(.category-cleaning):not(.category-security):not(.category-utilities):not(.category-construction):not(.category-legal):not(.category-accounting):not(.category-other):not(.category-insurance):not(.category-realestate):not(.category-finance):not(.category-technical),
[data-theme="darkmodern"] .category-badge[data-category]:not(.category-maintenance):not(.category-cleaning):not(.category-security):not(.category-utilities):not(.category-construction):not(.category-legal):not(.category-accounting):not(.category-other):not(.category-insurance):not(.category-realestate):not(.category-finance):not(.category-technical) {
  background: rgba(229, 231, 235, 0.15);
  color: #9ca3af;
}

/* ============================================
   8. STATUS INDICATORS
   ============================================ */

.status-active {
  color: var(--ios-system-green);
}

.status-inactive {
  color: var(--text-tertiary);
}

.status-pending {
  color: var(--ios-system-orange);
}

.status-error {
  color: var(--ios-system-red);
}

.status-dot {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  margin-right: 0.5em;
}

.status-dot-active {
  background: var(--ios-system-green);
  box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.2);
}

.status-dot-inactive {
  background: var(--text-quaternary);
}

.status-dot-pending {
  background: var(--ios-system-orange);
  box-shadow: 0 0 0 2px rgba(255, 149, 0, 0.2);
}

.status-dot-error {
  background: var(--ios-system-red);
  box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.2);
}

/* ============================================
   9. INTERACTIVE COLOR STATES
   ============================================ */

/* Hover color utilities */
.hover\:text-success:hover {
  color: var(--ios-system-green);
}

.hover\:text-error:hover {
  color: var(--ios-system-red);
}

.hover\:text-warning:hover {
  color: var(--ios-system-orange);
}

.hover\:text-info:hover {
  color: var(--ios-system-orange);
}

/* Focus ring utilities */
.focus-ring-success:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.3);
}

.focus-ring-error:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.3);
}

.focus-ring-warning:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.3);
}

.focus-ring-info:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.3);
}

.focus-ring-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3);
}

/**
 * COEUS Design System - Responsive Utilities
 * ==========================================
 * Intelligent responsive containers, grids, and visibility utilities
 * Using em-based units for accessibility and true responsiveness
 *
 * Breakpoint System (em-based):
 * - xs: 0 - 30em (0 - 480px) - Phones portrait
 * - sm: 30em - 48em (480px - 768px) - Phones landscape / Small tablets
 * - md: 48em - 64em (768px - 1024px) - Tablets
 * - lg: 64em - 80em (1024px - 1280px) - Laptops
 * - xl: 80em - 96em (1280px - 1536px) - Desktops
 * - 2xl: 96em+ (1536px+) - Large screens
 *
 * Dependencies: core/variables-v2.css
 */

/* ============================================
   1. ADAPTIVE CONTAINERS
   ============================================ */

/* Container with intelligent min/max constraints */
.container-adaptive {
  width: 100%;
  min-width: 20em;   /* 320px at 16px base */
  max-width: 90em;   /* 1440px at 16px base */
  margin-inline: auto;
  padding-inline: clamp(1em, 5vw, 3em);
}

/* Narrow container for focused content */
.container-narrow {
  width: 100%;
  max-width: 45em;   /* 720px at 16px base */
  margin-inline: auto;
  padding-inline: clamp(1em, 4vw, 2em);
}

/* Wide container for dashboards */
.container-wide {
  width: 100%;
  max-width: 100em;  /* 1600px at 16px base */
  margin-inline: auto;
  padding-inline: clamp(0.5em, 3vw, 2em);
}

/* Full-bleed container */
.container-full {
  width: 100%;
  padding-inline: clamp(0.5em, 2vw, 1.5em);
}

/* ============================================
   2. RESPONSIVE CARD CONTAINERS
   ============================================ */

/* Card with responsive sizing */
.card-responsive {
  min-width: min(100%, 18em);
  max-width: min(100%, 45em);
}

/* Card compact - for grids */
.card-compact {
  min-width: min(100%, 15em);
  max-width: min(100%, 25em);
}

/* Card wide - for details */
.card-wide {
  min-width: min(100%, 20em);
  max-width: min(100%, 60em);
}

/* ============================================
   3. MODAL SIZE VARIANTS
   ============================================ */

.modal-xs {
  width: min(90vw, 20em);
  max-height: min(90vh, 30em);
}

.modal-sm {
  width: min(90vw, 25em);
  max-height: min(90vh, 40em);
}

.modal-md {
  width: min(90vw, 37.5em);
  max-height: min(90vh, 50em);
}

.modal-lg {
  width: min(90vw, 50em);
  max-height: min(90vh, 60em);
}

.modal-xl {
  width: min(95vw, 75em);
  max-height: min(95vh, 70em);
}

.modal-full {
  width: calc(100vw - 2em);
  max-width: 100em;
  max-height: calc(100vh - 2em);
}

/* Responsive modal adjustments */
@media (max-width: 48em) {
  .modal-sm,
  .modal-md,
  .modal-lg {
    width: calc(100vw - 1em);
    max-height: calc(100vh - 2em);
    border-radius: var(--radius-lg, 1.5em);
  }
}

/* ============================================
   4. RESPONSIVE GRID SYSTEMS
   ============================================ */

/* Auto-fit grid - fills available space */
.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18em), 1fr));
  gap: var(--spacing-4, 1em);
}

/* Auto-fill grid - maintains minimum size */
.grid-auto-fill {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15em), 1fr));
  gap: var(--spacing-4, 1em);
}

/* Grid with specific column counts */
.grid-responsive-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20em), 1fr));
  gap: var(--spacing-4, 1em);
}

.grid-responsive-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16em), 1fr));
  gap: var(--spacing-4, 1em);
}

.grid-responsive-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14em), 1fr));
  gap: var(--spacing-4, 1em);
}

/* Dashboard grid */
.grid-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22em), 1fr));
  gap: var(--spacing-6, 1.5em);
}

/* Card grid with fixed columns at breakpoints */
.grid-cards {
  display: grid;
  gap: var(--spacing-4, 1em);
  grid-template-columns: 1fr;
}

@media (min-width: 30em) {
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64em) {
  .grid-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 80em) {
  .grid-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   5. RESPONSIVE FLEX LAYOUTS
   ============================================ */

/* Flex that wraps on small screens */
.flex-responsive {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-4, 1em);
}

/* Row to column on mobile */
.flex-row-col {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-4, 1em);
}

@media (max-width: 48em) {
  .flex-row-col {
    flex-direction: column;
  }
}

/* Column to row on desktop */
.flex-col-row {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4, 1em);
}

@media (min-width: 48em) {
  .flex-col-row {
    flex-direction: row;
  }
}

/* Sidebar layout */
.layout-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4, 1em);
}

@media (min-width: 64em) {
  .layout-sidebar {
    flex-direction: row;
  }

  .layout-sidebar > .sidebar {
    flex: 0 0 16em;
    min-width: 16em;
    max-width: 20em;
  }

  .layout-sidebar > .main-content {
    flex: 1;
    min-width: 0;
  }
}

/* ============================================
   6. RESPONSIVE VISIBILITY
   ============================================ */

/* Hide on specific breakpoints */
@media (max-width: 30em) {
  .hide-xs { display: none !important; }
}

@media (max-width: 48em) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 30.0625em) and (max-width: 48em) {
  .hide-sm { display: none !important; }
}

@media (min-width: 48.0625em) and (max-width: 64em) {
  .hide-tablet { display: none !important; }
  .hide-md { display: none !important; }
}

@media (min-width: 64.0625em) {
  .hide-desktop { display: none !important; }
  .hide-lg-up { display: none !important; }
}

@media (min-width: 80.0625em) {
  .hide-xl-up { display: none !important; }
}

/* Show only on specific breakpoints */
.show-xs-only {
  display: none !important;
}

@media (max-width: 30em) {
  .show-xs-only { display: block !important; }
}

.show-mobile-only {
  display: none !important;
}

@media (max-width: 48em) {
  .show-mobile-only { display: block !important; }
}

.show-tablet-only {
  display: none !important;
}

@media (min-width: 48.0625em) and (max-width: 64em) {
  .show-tablet-only { display: block !important; }
}

.show-desktop-only {
  display: none !important;
}

@media (min-width: 64.0625em) {
  .show-desktop-only { display: block !important; }
}

/* ============================================
   7. RESPONSIVE TEXT
   ============================================ */

/* Text that truncates on small screens */
.text-truncate-mobile {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 48em) {
  .text-truncate-mobile {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
}

/* Responsive text alignment */
.text-center-mobile {
  text-align: center;
}

@media (min-width: 48em) {
  .text-center-mobile {
    text-align: left;
  }
}

.text-center-until-lg {
  text-align: center;
}

@media (min-width: 64em) {
  .text-center-until-lg {
    text-align: left;
  }
}

/* ============================================
   8. RESPONSIVE SPACING
   ============================================ */

/* Reduced padding on mobile */
.p-responsive {
  padding: clamp(0.75em, 3vw, 1.5em);
}

.px-responsive {
  padding-left: clamp(0.75em, 3vw, 1.5em);
  padding-right: clamp(0.75em, 3vw, 1.5em);
}

.py-responsive {
  padding-top: clamp(0.75em, 3vw, 1.5em);
  padding-bottom: clamp(0.75em, 3vw, 1.5em);
}

/* Responsive gaps */
.gap-responsive {
  gap: clamp(0.5em, 2vw, 1.5em);
}

.gap-responsive-lg {
  gap: clamp(1em, 3vw, 2em);
}

/* ============================================
   9. RESPONSIVE WIDTHS
   ============================================ */

/* Full width on mobile, constrained on desktop */
.w-full-mobile {
  width: 100%;
}

@media (min-width: 48em) {
  .w-full-mobile {
    width: auto;
  }
}

/* Responsive max-widths */
.max-w-responsive-sm {
  max-width: min(100%, 30em);
}

.max-w-responsive-md {
  max-width: min(100%, 45em);
}

.max-w-responsive-lg {
  max-width: min(100%, 60em);
}

.max-w-responsive-xl {
  max-width: min(100%, 80em);
}

/* ============================================
   10. ASPECT RATIO UTILITIES
   ============================================ */

.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-photo {
  aspect-ratio: 4 / 3;
}

.aspect-portrait {
  aspect-ratio: 3 / 4;
}

.aspect-wide {
  aspect-ratio: 21 / 9;
}

/* ============================================
   11. CONTAINER QUERIES (Modern Browsers)
   ============================================ */

/* Container query context */
.container-query {
  container-type: inline-size;
}

/* Card content adjustments based on container size */
@container (min-width: 20em) {
  .cq-flex-row {
    flex-direction: row;
  }
}

@container (max-width: 20em) {
  .cq-flex-col {
    flex-direction: column;
  }
}

@container (min-width: 30em) {
  .cq-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@container (min-width: 45em) {
  .cq-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   12. SCROLL BEHAVIOR
   ============================================ */

/* Horizontal scroll on mobile */
.scroll-x-mobile {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

@media (min-width: 48em) {
  .scroll-x-mobile {
    overflow-x: visible;
  }
}

/* Hide scrollbar but keep functionality */
.scroll-hidden {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-hidden::-webkit-scrollbar {
  display: none;
}

/* Snap scrolling */
.scroll-snap-x {
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.scroll-snap-item {
  scroll-snap-align: start;
}


/* ============================================ */
/*              11. PAGE OVERRIDES              */
/*   Page-specific styles (unchanged)          */
/* ============================================ */
/**
 * Landing Page Styles - COEUS
 * Purpose: Marketing landing page with regional pricing and contact forms
 * Dependencies: coeus-master.css, typography-system.css
 * Theme-responsive: Uses CSS variables for all colors
 * Design: Clean, minimal, professional SaaS aesthetic
 */

/* Smooth scrolling - hardware accelerated */
html {

    scroll-behavior: smooth;
}



/* Remove video background - use clean gradient instead */
body[data-page="landing"] .hero-video-container {

    display: none;
}



/* Scroll animation - GPU accelerated */
body[data-page="landing"] .scroll-fade-in {

    opacity: 0;
    transform: translateY(2.5em) translateZ(0);
    will-change: opacity, transform;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}



body[data-page="landing"] .scroll-fade-in.visible {

    opacity: 1;
    transform: translateY(0) translateZ(0);
    will-change: auto;
}



/* Staggered animation delays for children */
body[data-page="landing"] .features-grid .scroll-fade-in:nth-child(1) {
 transition-delay: 0s; }


body[data-page="landing"] .features-grid .scroll-fade-in:nth-child(2) {
 transition-delay: 0.1s; }


body[data-page="landing"] .features-grid .scroll-fade-in:nth-child(3) {
 transition-delay: 0.2s; }


body[data-page="landing"] .features-grid .scroll-fade-in:nth-child(4) {
 transition-delay: 0.3s; }


body[data-page="landing"] .features-grid .scroll-fade-in:nth-child(5) {
 transition-delay: 0.4s; }


body[data-page="landing"] .features-grid .scroll-fade-in:nth-child(6) {
 transition-delay: 0.5s; }



body[data-page="landing"] .pricing-grid .scroll-fade-in:nth-child(1) {
 transition-delay: 0s; }


body[data-page="landing"] .pricing-grid .scroll-fade-in:nth-child(2) {
 transition-delay: 0.15s; }


body[data-page="landing"] .pricing-grid .scroll-fade-in:nth-child(3) {
 transition-delay: 0.3s; }


body[data-page="landing"] .pricing-grid .scroll-fade-in:nth-child(4) {
 transition-delay: 0.45s; }



body[data-page="landing"] .stats-grid .scroll-fade-in:nth-child(1) {
 transition-delay: 0s; }


body[data-page="landing"] .stats-grid .scroll-fade-in:nth-child(2) {
 transition-delay: 0.1s; }


body[data-page="landing"] .stats-grid .scroll-fade-in:nth-child(3) {
 transition-delay: 0.2s; }


body[data-page="landing"] .stats-grid .scroll-fade-in:nth-child(4) {
 transition-delay: 0.3s; }



/* Landing Layout */
body[data-page="landing"] .landing-wrapper {

    position: relative;
    z-index: 1;
    /* Force hardware acceleration for smooth scrolling */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}



/* Hero Section - Clean and minimal */
body[data-page="landing"] .hero-section {

    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 8em 2em 6em;
    background: linear-gradient(180deg,
        var(--glass-primary) 0%,
        transparent 100%
    );
}



body[data-page="landing"] .hero-logo {

    font-size: 4em;
    margin-bottom: 0.5em;
    animation: fadeInScale 0.6s ease-out;
    color: var(--accent-blue);
    opacity: 0.9;
}



body[data-page="landing"] .hero-brand {

    font-family: var(--font-logo, 'Bodoni Moda'), serif; /* COEUS logo only */
    font-size: 4em;
    font-weight: 800;
    margin: 0.2em 0;
    color: var(--text-primary);
    animation: fadeInUp 0.6s ease-out 0.05s both;
    letter-spacing: 0.1em;
    opacity: 0.95;
}



body[data-page="landing"] .hero-title {

    font-family: var(--font-serif, 'Noto Serif JP'), serif; /* Noto for headings */
    font-size: 3.5em;
    font-weight: 700;
    margin: 0 0 0.4em 0;
    color: var(--text-primary);
    animation: fadeInUp 0.6s ease-out 0.1s both;
    letter-spacing: -0.02em;
    line-height: 1.2;
    max-width: 25em;
}



body[data-page="landing"] .hero-subtitle {

    font-size: 1.5em;
    color: var(--text-secondary);
    margin: 0 0 2em 0;
    max-width: 50em;
    line-height: 1.6;
    animation: fadeInUp 0.6s ease-out 0.2s both;
    font-weight: 400;
}



body[data-page="landing"] .hero-cta {

    display: inline-flex;
    align-items: center;
    gap: 0.75em;
    padding: 1.25em 3.5em;
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    border-radius: 0.875em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 0.25em 1em rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}



body[data-page="landing"] .hero-cta:hover {

    transform: translateY(-0.125em);
    box-shadow: 0 0.5em 2em rgba(0, 0, 0, 0.15);
}



body[data-page="landing"] .hero-cta:active {

    transform: translateY(0);
}



/* Trust badges in hero */
body[data-page="landing"] .hero-trust-badges {

    display: flex;
    justify-content: center;
    gap: 2em;
    margin: 2em 0;
    animation: fadeInUp 0.6s ease-out 0.35s both;
}



body[data-page="landing"] .trust-badge {

    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.625em 1.25em;
    background: var(--glass-primary);
    backdrop-filter: blur(1em);
    border-radius: 0.625em;
    border: 1px solid var(--glass-border);
    font-size: 0.875em;
    color: var(--text-primary);
    font-weight: 600;
}



body[data-page="landing"] .trust-badge i {

    color: var(--accent-blue);
    font-size: 1.125em;
}



/* Secondary CTA - less prominent */
body[data-page="landing"] .hero-cta-secondary {

    display: inline-flex;
    align-items: center;
    gap: 0.75em;
    padding: 1em 2.5em;
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.875em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    margin-top: 1em;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}



body[data-page="landing"] .hero-cta-secondary:hover {

    background: var(--glass-hover);
    border-color: var(--accent-blue);
    transform: translateY(-0.125em);
}



/* Section Separators - Subtle and clean */
body[data-page="landing"] .section-separator {

    width: 100%;
    max-width: 75em;
    height: 1px;
    background: var(--glass-border);
    margin: 8em auto;
    opacity: 0.5;
}



body[data-page="landing"] .section-separator-thick {

    width: 100%;
    max-width: 75em;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--glass-border) 50%,
        transparent 100%
    );
    margin: 10em auto;
    opacity: 0.3;
}



/* Section Layout */
body[data-page="landing"] .landing-section {

    padding: 6em 2em;
    max-width: 75em;
    margin: 0 auto;
}



/* ============================================
   INDEX.HTML LANDING PAGE STYLES
   Purpose: Styles for the main marketing landing page (index.html)
   Uses data-page="index" to scope styles
   ============================================ */

/* Section Spacing - Fix for "glued together" sections */
body[data-page="index"] .landing-section {
    padding: 6em 2em;
    max-width: 75em;
    margin: 0 auto;
}

body[data-page="index"] .landing-section + .landing-section {
    margin-top: 6em;
}

body[data-page="index"] .section-gap-lg {
    margin-top: 10em;
}

body[data-page="index"] .section-gap-sm {
    margin-top: 4em;
}

/* Container - Override global reset */
body[data-page="index"] .container {
    max-width: 75em;
    margin: 0 auto;
    padding: 0 2em;
    position: relative;
    z-index: 2;
}

/* Navigation */
body[data-page="index"] nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2em;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    mix-blend-mode: difference;
}

body[data-page="index"] .logo {
    font-family: var(--font-logo, 'Bodoni Moda'), serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.8em;
    color: var(--text-primary);
}

body[data-page="index"] .nav-links {
    display: flex;
    align-items: center;
    gap: 1em;
}

body[data-page="index"] .nav-link {
    padding: 0.6em 1.2em;
    font-size: 0.9em;
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

body[data-page="index"] .nav-link:hover {
    color: var(--accent-orange, #ff6600);
}

body[data-page="index"] .nav-btn {
    border: 1px solid var(--glass-border);
    padding: 0.8em 1.5em;
    border-radius: 3.125em;
    font-size: 0.9em;
    text-decoration: none;
    color: var(--text-primary);
    backdrop-filter: blur(0.625em);
    transition: all 0.3s ease;
}

body[data-page="index"] .nav-btn:hover {
    background: var(--accent-orange, #ff6600);
    border-color: var(--accent-orange, #ff6600);
}

body[data-page="index"] .nav-btn-primary {
    background: var(--accent-orange, #ff6600);
    border: 1px solid var(--accent-orange, #ff6600);
    padding: 0.8em 1.5em;
    border-radius: 3.125em;
    font-size: 0.9em;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

body[data-page="index"] .nav-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-0.125em);
}

/* Hero Section */
body[data-page="index"] .hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 10vh;
    position: relative;
    z-index: 2;
}

body[data-page="index"] .role-toggle-container {
    display: inline-flex;
    background: var(--glass-primary);
    border-radius: 3.125em;
    padding: 0.25em;
    margin-bottom: 2em;
    backdrop-filter: blur(1.25em);
    border: 1px solid var(--glass-border);
}

body[data-page="index"] .role-toggle-btn {
    padding: 0.8em 2em;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 3.125em;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
}

body[data-page="index"] .role-toggle-btn.active {
    background: var(--accent-orange, #ff6600);
    color: var(--text-primary);
}

body[data-page="index"] .hero-label {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-orange, #ff6600);
    margin-bottom: 1em;
}

body[data-page="index"] .hero h1 {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: 4.5em;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    color: var(--text-primary);
    max-width: 15em;
}

body[data-page="index"] .hero .subtitle {
    font-size: 1.3em;
    color: var(--text-secondary);
    margin-top: 1.5em;
    max-width: 40em;
    line-height: 1.6;
}

body[data-page="index"] .cta-container {
    display: flex;
    gap: 1em;
    margin-top: 2em;
}

body[data-page="index"] .cta-primary {
    background: var(--accent-orange, #ff6600);
    color: var(--text-primary);
    padding: 1em 2.5em;
    border: none;
    border-radius: 3.125em;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

body[data-page="index"] .cta-primary:hover {
    transform: translateY(-0.188em);
    box-shadow: 0 0.625em 1.875em rgba(255, 102, 0, 0.3);
}

body[data-page="index"] .cta-secondary {
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 1em 2.5em;
    border-radius: 3.125em;
    font-size: 1em;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
}

body[data-page="index"] .cta-secondary:hover {
    border-color: var(--accent-orange, #ff6600);
    color: var(--accent-orange, #ff6600);
}

/* Chat Demo Section */
body[data-page="index"] .chat-section {
    padding: 8em 0 12em;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

body[data-page="index"] .chat-section h2 {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-bottom: 1em;
}

body[data-page="index"] .chat-container {
    max-width: 43.75em;
    display: flex;
    flex-direction: column;
    gap: 2em;
    margin-top: 4em;
}

body[data-page="index"] .chat-bubble {
    padding: 1.5em 2em;
    border-radius: 1.25em;
    font-size: 1.2em;
    line-height: 1.5;
    opacity: 0;
    animation: fadeInBubble 0.5s ease forwards;
}

body[data-page="index"] .user-bubble {
    background: var(--glass-primary);
    color: var(--text-primary);
    align-self: flex-end;
    border-bottom-right-radius: 0.25em;
    max-width: 85%;
    backdrop-filter: blur(1.25em);
}

body[data-page="index"] .ai-bubble {
    background: var(--accent-orange, #ff6600);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 0.25em;
    max-width: 90%;
    display: flex;
    gap: 0.75em;
    align-items: flex-start;
    box-shadow: 0 0.625em 2.5em rgba(255, 102, 0, 0.25);
}

body[data-page="index"] .ai-avatar {
    width: 1.875em;
    height: 1.875em;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    flex-shrink: 0;
}

@keyframes fadeInBubble {
    from {
        opacity: 0;
        transform: translateY(1.25em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Features Section */
body[data-page="index"] .features-section {
    padding: 8em 0;
}

body[data-page="index"] .features-section h2 {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3em;
}

body[data-page="index"] .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17.5em, 1fr));
    gap: 2em;
}

body[data-page="index"] .card {
    padding: 3em;
    transition: all 0.4s ease;
}

body[data-page="index"] .card:hover {
    transform: translateY(-0.313em);
}

body[data-page="index"] .benefit-icon {
    font-size: 2.5em;
    margin-bottom: 1em;
}

body[data-page="index"] .card h3 {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: 1.4em;
    margin-bottom: 1em;
    color: var(--text-primary);
}

body[data-page="index"] .card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1em;
}

/* Features More Link */
body[data-page="index"] .features-more {
    text-align: center;
    margin-top: 4em;
}

body[data-page="index"] .features-more a {
    color: var(--accent-orange, #ff6600);
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

body[data-page="index"] .features-more a:hover {
    opacity: 0.8;
}

/* Glass Container for index page */
body[data-page="index"] .glass-container {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(1.25em);
    -webkit-backdrop-filter: blur(1.25em);
    border-radius: 1.5em;
    box-shadow: 0 0.625em 2.5em -0.625em rgba(255, 102, 0, 0.3),
                inset 0 0 1.25em rgba(255, 102, 0, 0.05);
    transition: all 0.4s ease;
}

body[data-page="index"] .glass-container:hover {
    border-color: rgba(255, 102, 0, 0.5);
    box-shadow: 0 1.25em 3.75em -0.625em rgba(255, 102, 0, 0.5),
                inset 0 0 1.875em rgba(255, 102, 0, 0.1);
    transform: translateY(-0.313em);
}

/* Steps Section */
body[data-page="index"] .steps-section {
    padding: 8em 0;
}

body[data-page="index"] .steps-section h2 {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3em;
}

body[data-page="index"] .step-row {
    display: flex;
    align-items: flex-start;
    gap: 2em;
    margin-bottom: 2em;
    padding: 2em;
}

body[data-page="index"] .step-number {
    font-family: var(--font-logo, 'Bodoni Moda'), serif;
    font-size: 4em;
    color: var(--accent-orange, #ff6600);
    opacity: 0.5;
    line-height: 1;
}

body[data-page="index"] .step-content h3 {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: 1.5em;
    margin-bottom: 0.5em;
    color: var(--text-primary);
}

body[data-page="index"] .step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Pricing Section (Vendor) */
body[data-page="index"] .pricing-section {
    padding: 8em 0;
    display: none;
}

body[data-page="index"] .pricing-section.visible {
    display: block;
}

body[data-page="index"] .pricing-card {
    max-width: 31.25em;
    margin: 0 auto;
    padding: 4em;
}

body[data-page="index"] .price-tag {
    font-family: var(--font-logo, 'Bodoni Moda'), serif;
    font-size: 4em;
    margin: 2em 0 0.5em;
    color: var(--text-primary);
}

body[data-page="index"] .price-period {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    font-size: 0.9em;
}

body[data-page="index"] .old-price {
    text-decoration: line-through;
    color: var(--text-tertiary);
    font-size: 1.2em;
    margin-bottom: 0.5em;
}

body[data-page="index"] .pricing-features {
    list-style: none;
    padding: 0;
    margin: 2em 0;
    text-align: left;
}

body[data-page="index"] .pricing-features li {
    padding: 0.75em 0;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
}

body[data-page="index"] .pricing-features li:last-child {
    border-bottom: none;
}

/* FAQ Section (Vendor) */
body[data-page="index"] .faq-section {
    padding: 6em 0;
    display: none;
}

body[data-page="index"] .faq-section.visible {
    display: block;
}

body[data-page="index"] .faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25em, 1fr));
    gap: 3em;
    margin-top: 4em;
}

body[data-page="index"] .faq-item h3 {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: 1.2em;
    margin-bottom: 0.75em;
    color: var(--text-primary);
}

body[data-page="index"] .faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Final CTA Section */
body[data-page="index"] .final-cta-section {
    padding: 8em 0;
    text-align: center;
}

body[data-page="index"] .final-cta-section h2 {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: 3em;
    margin-bottom: 1.5em;
    color: var(--text-primary);
}

/* Footer */
body[data-page="index"] footer {
    background: var(--glass-primary);
    padding: 4em 2em 2em;
    margin-top: 8em;
    backdrop-filter: blur(1.25em);
}

body[data-page="index"] .footer-container {
    max-width: 75em;
    margin: 0 auto;
}

body[data-page="index"] .footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3em;
    margin-bottom: 3em;
}

body[data-page="index"] .footer-brand {
    max-width: 18.75em;
}

body[data-page="index"] .footer-brand .logo {
    font-family: var(--font-logo, 'Bodoni Moda'), serif;
    font-size: 1.5em;
    margin-bottom: 1em;
    display: block;
    color: var(--text-primary);
}

body[data-page="index"] .footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.6;
}

body[data-page="index"] .footer-column h4 {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5em;
    color: var(--text-primary);
}

body[data-page="index"] .footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.75em;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

body[data-page="index"] .footer-column a:hover {
    color: var(--accent-orange, #ff6600);
}

body[data-page="index"] .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="index"] .footer-bottom p {
    color: var(--text-tertiary);
    font-size: 0.85em;
}

body[data-page="index"] .footer-social {
    display: flex;
    gap: 1em;
}

body[data-page="index"] .footer-social a {
    color: var(--text-secondary);
    font-size: 1.2em;
    transition: color 0.3s ease;
}

body[data-page="index"] .footer-social a:hover {
    color: var(--accent-orange, #ff6600);
}

/* Mode Toggle Visibility */
body[data-page="index"] .mode-owner {
    display: block;
}

body[data-page="index"] .mode-vendor {
    display: none;
}

body[data-page="index"][data-mode="vendor"] .mode-owner {
    display: none;
}

body[data-page="index"][data-mode="vendor"] .mode-vendor {
    display: block;
}

/* Responsive for index page */
@media (max-width: 75em) {
    body[data-page="index"] .hero h1 {
        font-size: 3.5em;
    }

    body[data-page="index"] .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-page="index"] .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 2em;
    }
}

@media (max-width: 48em) {
    body[data-page="index"] .hero h1 {
        font-size: 2.5em;
    }

    body[data-page="index"] .hero .subtitle {
        font-size: 1.1em;
    }

    body[data-page="index"] .cta-container {
        flex-direction: column;
        align-items: center;
    }

    body[data-page="index"] .features-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="index"] .step-row {
        flex-direction: column;
        gap: 1em;
    }

    body[data-page="index"] .step-number {
        font-size: 3em;
    }

    body[data-page="index"] .faq-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="index"] .footer-top {
        grid-template-columns: 1fr;
    }

    body[data-page="index"] .footer-bottom {
        flex-direction: column;
        gap: 1em;
        text-align: center;
    }

    body[data-page="index"] .nav-links {
        display: none;
    }

    body[data-page="index"] .landing-section + .landing-section {
        margin-top: 4em;
    }
}



body[data-page="landing"] .landing-section-wide {

    padding: 6em 2em;
    max-width: 87.5em;
    margin: 0 auto;
}



body[data-page="landing"] .section-label {

    font-size: 0.875em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 1.5em;
    text-align: center;
    opacity: 0.8;
}



body[data-page="landing"] .section-title {

    font-family: 'Bodoni Moda', serif;
    font-size: 3em;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 0.5em 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}



body[data-page="landing"] .section-description {

    font-size: 1.25em;
    color: var(--text-secondary);
    text-align: center;
    max-width: 50em;
    margin: 0 auto 4em;
    line-height: 1.7;
    font-weight: 400;
}



/* Asymmetric Grid - Cleaner styling */
body[data-page="landing"] .asymmetric-grid {

    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2em;
    margin-top: 4em;
}



body[data-page="landing"] .grid-item-large {

    grid-column: span 7;
    padding: 3em;
    background: var(--glass-primary);
    backdrop-filter: blur(1.5em);
    border-radius: 1.5em;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}



body[data-page="landing"] .grid-item-small {

    grid-column: span 5;
    padding: 3em;
    background: var(--glass-secondary);
    backdrop-filter: blur(1.5em);
    border-radius: 1.5em;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}



body[data-page="landing"] .grid-item-large:hover,
body[data-page="landing"] .grid-item-small:hover {

    transform: translateY(-0.25em);
    box-shadow: 0 0.5em 2em rgba(0, 0, 0, 0.08);
    border-color: var(--accent-blue);
}



body[data-page="landing"] .grid-item-offset-small {

    grid-column: 2 / span 5;
}



body[data-page="landing"] .grid-item-offset-large {

    grid-column: 7 / span 6;
}



body[data-page="landing"] .grid-item-icon {

    font-size: 2.5em;
    color: var(--accent-blue);
    margin-bottom: 1em;
}



body[data-page="landing"] .grid-item-title {

    font-family: 'Bodoni Moda', serif;
    font-size: 1.75em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75em 0;
    line-height: 1.3;
}



body[data-page="landing"] .grid-item-description {

    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}



/* Features Grid - Card style */
body[data-page="landing"] .features-grid {

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
    margin-top: 4em;
}



body[data-page="landing"] .feature-card {

    padding: 2.5em;
    background: var(--glass-primary);
    backdrop-filter: blur(1.5em);
    border-radius: 1.25em;
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}



body[data-page="landing"] .feature-card:hover {

    background: var(--glass-hover);
    transform: translateY(-0.25em);
    border-color: var(--accent-blue);
}



body[data-page="landing"] .feature-number {

    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1em;
    margin-bottom: 1.5em;
}



body[data-page="landing"] .feature-title {

    font-size: 1.375em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75em 0;
    line-height: 1.3;
}



body[data-page="landing"] .feature-description {

    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}



/* Region Selector - Clean toggle buttons */
body[data-page="landing"] .region-selector {

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1em;
    margin: 2em auto 3em;
    padding: 0.5em;
    background: var(--glass-primary);
    backdrop-filter: blur(1.5em);
    border-radius: 1em;
    border: 1px solid var(--glass-border);
    max-width: 28em;
}



body[data-page="landing"] .region-button {

    flex: 1;
    padding: 0.875em 2em;
    background: transparent;
    border: none;
    border-radius: 0.75em;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}



body[data-page="landing"] .region-button:hover {

    background: var(--glass-hover);
    color: var(--text-primary);
}



body[data-page="landing"] .region-button.region-active {

    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: var(--text-primary);
    box-shadow: 0 0.25em 1em rgba(0, 123, 255, 0.2);
}



body[data-page="landing"] .region-button.region-active:hover {

    box-shadow: 0 0.375em 1.5em rgba(0, 123, 255, 0.3);
}



/* Pricing Grid - Modern card design */
body[data-page="landing"] .pricing-grid {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17.5em, 1fr));
    gap: 2em;
    margin-top: 4em;
    max-width: 75em;
    margin-left: auto;
    margin-right: auto;
}



body[data-page="landing"] .pricing-card {

    padding: 2.5em;
    background: var(--glass-primary);
    backdrop-filter: blur(1.5em);
    border-radius: 1.25em;
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}



body[data-page="landing"] .pricing-card-featured {

    background: var(--glass-secondary);
    border: 2px solid var(--accent-blue);
    box-shadow: 0 0.5em 2em rgba(0, 123, 255, 0.1);
}



body[data-page="landing"] .pricing-card:hover {

    transform: translateY(-0.25em);
    box-shadow: 0 0.5em 2em rgba(0, 0, 0, 0.08);
    border-color: var(--accent-blue);
}



body[data-page="landing"] .pricing-card-featured:hover {

    box-shadow: 0 0.75em 3em rgba(0, 123, 255, 0.15);
}



body[data-page="landing"] .pricing-badge {

    position: absolute;
    top: -0.75em;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5em 1.25em;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: var(--text-primary);
    font-size: 0.75em;
    font-weight: 700;
    border-radius: 2em;
    white-space: nowrap;
}



body[data-page="landing"] .pricing-name {

    font-family: 'Bodoni Moda', serif;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.5em 0 0.5em 0;
}



body[data-page="landing"] .pricing-price {

    font-family: 'Bodoni Moda', serif;
    font-size: 2.75em;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
}



body[data-page="landing"] .pricing-price-currency {

    font-size: 0.5em;
    color: var(--text-secondary);
    font-weight: 600;
}



body[data-page="landing"] .pricing-period {

    font-size: 0.875em;
    color: var(--text-tertiary);
    margin: 0.5em 0 2em 0;
}



body[data-page="landing"] .pricing-features {

    list-style: none;
    padding: 0;
    margin: 0 0 2em 0;
    flex: 1;
}



body[data-page="landing"] .pricing-features li {

    padding: 0.75em 0;
    color: var(--text-primary);
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
    font-size: 0.9375em;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="landing"] .pricing-features li:last-child {

    border-bottom: none;
}



body[data-page="landing"] .pricing-features li::before {

    content: "✓";
    color: var(--accent-blue);
    font-weight: 700;
    flex-shrink: 0;
    font-size: 1.125em;
}



body[data-page="landing"] .pricing-cta {

    width: 100%;
    padding: 1em;
    background: var(--glass-hover);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



body[data-page="landing"] .pricing-cta:hover {

    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: var(--text-primary);
    border-color: transparent;
    transform: translateY(-0.125em);
}



/* Contact Form - Clean design */
body[data-page="landing"] .contact-form {

    max-width: 43.75em;
    margin: 4em auto 0;
    padding: 3em;
    background: var(--glass-primary);
    backdrop-filter: blur(1.5em);
    border-radius: 1.25em;
    border: 1px solid var(--glass-border);
}



body[data-page="landing"] .form-group {

    margin-bottom: 1.5em;
}



body[data-page="landing"] .form-label {

    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5em;
    font-size: 1em;
}



body[data-page="landing"] .form-input,
body[data-page="landing"] .form-textarea {

    width: 100%;
    padding: 1em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    color: var(--text-primary);
    font-size: 1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}



body[data-page="landing"] .form-input:focus,
body[data-page="landing"] .form-textarea:focus {

    outline: none;
    border-color: #f97316;
    background: var(--glass-hover);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}



body[data-page="landing"] .form-textarea {

    min-height: 10em;
    resize: vertical;
}



body[data-page="landing"] .form-submit {

    width: 100%;
    padding: 1.125em;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: var(--text-primary);
    border: none;
    border-radius: 0.75em;
    font-size: 1.125em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



body[data-page="landing"] .form-submit:hover {

    transform: translateY(-0.125em);
    box-shadow: 0 0.5em 2em rgba(0, 123, 255, 0.3);
}



body[data-page="landing"] .form-submit:disabled {

    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}



body[data-page="landing"] .form-message {

    margin-top: 1em;
    padding: 1em;
    border-radius: 0.75em;
    text-align: center;
    font-weight: 600;
}



body[data-page="landing"] .form-message-success {

    background: rgba(52, 199, 89, 0.1);
    color: var(--ios-system-green);
    border: 1px solid var(--ios-system-green);
}



body[data-page="landing"] .form-message-error {

    background: rgba(255, 59, 48, 0.1);
    color: var(--ios-system-red);
    border: 1px solid var(--ios-system-red);
}



/* Stats Section */
body[data-page="landing"] .stats-grid {

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3em;
    max-width: 75em;
    margin: 4em auto 0;
}



/* Testimonials Section */
body[data-page="landing"] .testimonials-grid {

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
    margin: 4em auto 0;
    max-width: 75em;
}



body[data-page="landing"] .testimonial-card {

    padding: 2.5em;
    background: var(--glass-primary);
    backdrop-filter: blur(1.5em);
    border-radius: 1.25em;
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}



body[data-page="landing"] .testimonial-card:hover {

    background: var(--glass-hover);
    transform: translateY(-0.25em);
    border-color: var(--accent-blue);
}



body[data-page="landing"] .testimonial-rating {

    display: flex;
    gap: 0.25em;
    margin-bottom: 1.5em;
    color: #FFB800;
    font-size: 1em;
}



body[data-page="landing"] .testimonial-text {

    flex: 1;
    font-size: 1.0625em;
    color: var(--text-primary);
    line-height: 1.7;
    margin: 0 0 2em 0;
    font-style: italic;
}



body[data-page="landing"] .testimonial-author {

    display: flex;
    flex-direction: column;
    gap: 0.25em;
    padding-top: 1.5em;
    border-top: 1px solid var(--glass-border);
}



body[data-page="landing"] .testimonial-author strong {

    font-size: 1em;
    color: var(--text-primary);
    font-weight: 700;
}



body[data-page="landing"] .testimonial-author span {

    font-size: 0.875em;
    color: var(--text-secondary);
}



/* Trust Logos */
body[data-page="landing"] .trust-logos {

    margin-top: 5em;
    text-align: center;
}



body[data-page="landing"] .trust-logo-label {

    font-size: 0.875em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-tertiary);
    font-weight: 600;
    margin-bottom: 2em;
}



body[data-page="landing"] .trust-logo-grid {

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3em;
    flex-wrap: wrap;
}



body[data-page="landing"] .trust-logo-item {

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75em;
    padding: 1.5em;
    background: var(--glass-primary);
    backdrop-filter: blur(1em);
    border-radius: 0.875em;
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 9em;
}



body[data-page="landing"] .trust-logo-item:hover {

    background: var(--glass-hover);
    border-color: var(--accent-blue);
}



body[data-page="landing"] .trust-logo-item i {

    font-size: 2em;
    color: var(--accent-blue);
}



body[data-page="landing"] .trust-logo-item span {

    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
}



/* FAQ Section */
body[data-page="landing"] .faq-container {

    max-width: 50em;
    margin: 4em auto 0;
}



body[data-page="landing"] .faq-item {

    margin-bottom: 1.5em;
    background: var(--glass-primary);
    backdrop-filter: blur(1.5em);
    border-radius: 1em;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



body[data-page="landing"] .faq-item:hover {

    border-color: var(--accent-blue);
}



body[data-page="landing"] .faq-question {

    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5em 2em;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



body[data-page="landing"] .faq-question:hover {

    background: var(--glass-hover);
}



body[data-page="landing"] .faq-question h3 {

    flex: 1;
    font-size: 1.125em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    padding-right: 1em;
}



body[data-page="landing"] .faq-question i {

    font-size: 1em;
    color: var(--accent-blue);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



body[data-page="landing"] .faq-item.active .faq-question i {

    transform: rotate(180deg);
}



body[data-page="landing"] .faq-answer {

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}



body[data-page="landing"] .faq-item.active .faq-answer {

    max-height: 31.25em;
    padding: 0 2em 1.5em;
}



body[data-page="landing"] .faq-answer p {

    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}



body[data-page="landing"] .stat-card {

    padding: 2em;
    text-align: center;
    background: var(--glass-primary);
    backdrop-filter: blur(1.5em);
    border-radius: 1.25em;
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



body[data-page="landing"] .stat-card:hover {

    transform: translateY(-0.25em);
    border-color: var(--accent-blue);
}



body[data-page="landing"] .stat-number {

    font-family: 'Bodoni Moda', serif;
    font-size: 3em;
    font-weight: 800;
    color: var(--accent-blue);
    margin: 0 0 0.25em 0;
    line-height: 1;
}



body[data-page="landing"] .stat-label {

    font-size: 0.9375em;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}



/* Animations - Smooth and subtle */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1.25em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 75em) {

    body[data-page="landing"] .asymmetric-grid {

        grid-template-columns: 1fr;
    }



    body[data-page="landing"] .grid-item-large,
body[data-page="landing"] .grid-item-small,
body[data-page="landing"] .grid-item-offset-small,
body[data-page="landing"] .grid-item-offset-large {

        grid-column: 1;
    }



    body[data-page="landing"] .features-grid {

        grid-template-columns: 1fr;
    }



    body[data-page="landing"] .stats-grid {

        grid-template-columns: repeat(2, 1fr);
    }



    body[data-page="landing"] .pricing-grid {

        grid-template-columns: 1fr;
    }


}


@media (max-width: 48em) {

    body[data-page="landing"] .hero-section {

        padding: 6em 1.5em 4em;
    }



    body[data-page="landing"] .hero-title {

        font-size: 3em;
    }



    body[data-page="landing"] .hero-subtitle {

        font-size: 1.125em;
    }



    body[data-page="landing"] .hero-cta {

        padding: 1em 2em;
        font-size: 1em;
    }



    body[data-page="landing"] .section-title {

        font-size: 2em;
    }



    body[data-page="landing"] .section-description {

        font-size: 1.125em;
    }



    body[data-page="landing"] .grid-item-large,
body[data-page="landing"] .grid-item-small {

        padding: 2em;
    }



    body[data-page="landing"] .landing-section,
body[data-page="landing"] .landing-section-wide {

        padding: 4em 1.5em;
    }



    body[data-page="landing"] .stats-grid {

        grid-template-columns: 1fr;
        gap: 1.5em;
    }



    body[data-page="landing"] .testimonials-grid {

        grid-template-columns: 1fr;
        gap: 1.5em;
    }



    body[data-page="landing"] .trust-logo-grid {

        gap: 1.5em;
    }



    body[data-page="landing"] .trust-badges {

        flex-direction: column;
        gap: 1em;
    }



    body[data-page="landing"] .hero-trust-badges {

        flex-wrap: wrap;
        gap: 1em;
    }



    body[data-page="landing"] .contact-form {

        padding: 2em;
    }



    body[data-page="landing"] .feature-card {

        padding: 2em;
    }



    body[data-page="landing"] .pricing-card {

        padding: 2em;
    }


}


@media (max-width: 30em) {

    body[data-page="landing"] .hero-title {

        font-size: 2.25em;
    }



    body[data-page="landing"] .hero-logo {

        font-size: 3em;
    }



    body[data-page="landing"] .section-separator,
body[data-page="landing"] .section-separator-thick {

        margin: 4em auto;
    }


}


/**
 * Landing Page Claude Version - COEUS
 * Purpose: Premium neuromarketing-optimized landing with neural network 3D
 * Aesthetic: "Liquid Intelligence" - Swiss fintech meets organic fluidity
 * Dependencies: coeus-master.css
 * Theme-responsive: Full light/dark support with CSS variables
 */

/* ============================================
   CSS VARIABLES - Page Specific
   ============================================ */
body[data-page="landing-claude"] {
    --gold-accent: #d4a853;
    --neural-blue: #FF9500;
    --neural-purple: #8b5cf6;
    --neural-gradient: linear-gradient(135deg, var(--neural-blue), var(--neural-purple));
    --urgency-red: #ef4444;
    --success-green: #22c55e;

    /* Timing */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark theme enhancements */
[data-theme="darkmodern"] body[data-page="landing-claude"],
[data-theme="dark"] body[data-page="landing-claude"] {
    --bg-deep: #0a0a0f;
    --bg-surface-elevated: rgba(255, 255, 255, 0.06);
    --glow-color: rgba(74, 158, 255, 0.15);
}

/* Light theme */
[data-theme="light"] body[data-page="landing-claude"],
[data-theme="lightmodern"] body[data-page="landing-claude"] {
    --bg-deep: #fafafa;
    --bg-surface-elevated: rgba(0, 0, 0, 0.04);
    --glow-color: rgba(74, 158, 255, 0.1);
    --gold-accent: #b8860b;
}

/* ============================================
   BASE & LAYOUT
   ============================================ */
body[data-page="landing-claude"] {
    background: #000000;
    background-image: radial-gradient(circle at 50% 0%, #0a0a1a 0%, #000000 50%);
    overflow-x: hidden;
    scroll-behavior: smooth;
    color: #ffffff;
}

/* Ensure light theme has proper background */
[data-theme="light"] body[data-page="landing-claude"],
[data-theme="lightmodern"] body[data-page="landing-claude"] {
    background: #fafafa;
    background-image: radial-gradient(circle at 50% 0%, #ffffff 0%, #f0f0f5 50%);
    color: #1a1a2e;
}

/* Explicit text colors for dark mode */
body[data-page="landing-claude"] {
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Explicit text colors for light mode */
[data-theme="light"] body[data-page="landing-claude"],
[data-theme="lightmodern"] body[data-page="landing-claude"] {
    --text-primary: #1a1a2e;
    --text-secondary: rgba(26, 26, 46, 0.7);
    --text-tertiary: rgba(26, 26, 46, 0.5);
    --glass-border: rgba(0, 0, 0, 0.1);
}

body[data-page="landing-claude"] .page-wrapper {
    position: relative;
    z-index: 1;
}

/* Three.js Canvas Container */
body[data-page="landing-claude"] #neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   NAVIGATION - Floating Glass
   ============================================ */
body[data-page="landing-claude"] .nav-claude {
    position: fixed;
    top: 1.5em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 2em;
    padding: 0.875em 2em;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2em) saturate(180%);
    -webkit-backdrop-filter: blur(2em) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100em;
    transition: all 0.4s var(--ease-smooth);
}

body[data-page="landing-claude"] .nav-claude:hover {
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0.5em 3em rgba(74, 158, 255, 0.15);
}

[data-theme="light"] body[data-page="landing-claude"] .nav-claude,
[data-theme="lightmodern"] body[data-page="landing-claude"] .nav-claude {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] body[data-page="landing-claude"] .nav-claude:hover,
[data-theme="lightmodern"] body[data-page="landing-claude"] .nav-claude:hover {
    background: rgba(255, 255, 255, 0.95);
}

body[data-page="landing-claude"] .nav-logo {
    font-family: var(--font-logo, 'Bodoni Moda'), serif;
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    text-decoration: none;
}

body[data-page="landing-claude"] .nav-links-claude {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="landing-claude"] .nav-link-claude {
    padding: 0.625em 1.25em;
    font-size: 0.875em;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 2em;
    transition: all 0.3s var(--ease-smooth);
}

body[data-page="landing-claude"] .nav-link-claude:hover {
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
}

body[data-page="landing-claude"] .nav-cta {
    padding: 0.625em 1.5em;
    font-size: 0.875em;
    font-weight: 600;
    color: #fff;
    background: var(--neural-gradient);
    border: none;
    border-radius: 2em;
    text-decoration: none;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: 0 0.25em 1em rgba(74, 158, 255, 0.3);
}

body[data-page="landing-claude"] .nav-cta:hover {
    transform: translateY(-0.125em);
    box-shadow: 0 0.5em 2em rgba(74, 158, 255, 0.4);
}

/* ============================================
   HERO SECTION - Immersive
   ============================================ */
body[data-page="landing-claude"] .hero-claude {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8em 2em 6em;
    z-index: 2;
}

/* Live Activity Indicator - Social Proof */
body[data-page="landing-claude"] .live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.5em 1.25em;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(1em);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100em;
    margin-bottom: 2em;
    animation: fadeInDown 0.8s var(--ease-out-expo) 0.2s both;
}

[data-theme="light"] body[data-page="landing-claude"] .live-indicator,
[data-theme="lightmodern"] body[data-page="landing-claude"] .live-indicator {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

body[data-page="landing-claude"] .live-dot {
    width: 0.5em;
    height: 0.5em;
    background: var(--success-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

body[data-page="landing-claude"] .live-text {
    font-size: 0.875em;
    color: var(--text-secondary);
}

body[data-page="landing-claude"] .live-count {
    font-weight: 700;
    color: var(--text-primary);
}

/* Mode Toggle */
body[data-page="landing-claude"] .mode-toggle-claude {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(1em);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100em;
    padding: 0.25em;
    margin-bottom: 3em;
    animation: fadeInDown 0.8s var(--ease-out-expo) 0.3s both;
}

[data-theme="light"] body[data-page="landing-claude"] .mode-toggle-claude,
[data-theme="lightmodern"] body[data-page="landing-claude"] .mode-toggle-claude {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

body[data-page="landing-claude"] .mode-btn {
    padding: 0.75em 2em;
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-radius: 100em;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

body[data-page="landing-claude"] .mode-btn.active {
    color: #fff;
    background: var(--neural-gradient);
    box-shadow: 0 0.25em 1em rgba(74, 158, 255, 0.4);
}

/* Hero Headlines */
body[data-page="landing-claude"] .hero-eyebrow {
    font-size: 0.875em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--gold-accent);
    margin-bottom: 1.5em;
    animation: fadeInDown 0.8s var(--ease-out-expo) 0.4s both;
}

body[data-page="landing-claude"] .hero-title-claude {
    font-family: var(--font-logo, 'Bodoni Moda'), serif;
    font-size: clamp(3.5em, 10vw, 8em);
    font-weight: 800;
    line-height: 0.95;
    color: var(--text-primary);
    margin: 0 0 0.25em 0;
    animation: fadeInUp 1s var(--ease-out-expo) 0.5s both;
}

body[data-page="landing-claude"] .hero-title-gradient {
    background: var(--neural-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-page="landing-claude"] .hero-subtitle-claude {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: clamp(1.125em, 2.5vw, 1.5em);
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 35em;
    margin: 0 auto 2.5em;
    line-height: 1.6;
    animation: fadeInUp 1s var(--ease-out-expo) 0.6s both;
}

/* CTA Cluster */
body[data-page="landing-claude"] .cta-cluster {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
    animation: fadeInUp 1s var(--ease-out-expo) 0.7s both;
}

body[data-page="landing-claude"] .cta-row {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    justify-content: center;
}

body[data-page="landing-claude"] .cta-primary-claude {
    display: inline-flex;
    align-items: center;
    gap: 0.75em;
    padding: 1.125em 2.5em;
    font-size: 1.0625em;
    font-weight: 600;
    color: #fff;
    background: var(--neural-gradient);
    border: none;
    border-radius: 100em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: 0 0.5em 2em rgba(74, 158, 255, 0.35);
}

body[data-page="landing-claude"] .cta-primary-claude:hover {
    transform: translateY(-0.1875em) scale(1.02);
    box-shadow: 0 0.75em 3em rgba(74, 158, 255, 0.45);
}

body[data-page="landing-claude"] .cta-secondary-claude {
    display: inline-flex;
    align-items: center;
    gap: 0.75em;
    padding: 1.125em 2.5em;
    font-size: 1.0625em;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(1em);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

body[data-page="landing-claude"] .cta-secondary-claude:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--neural-blue);
    transform: translateY(-0.1875em);
}

[data-theme="light"] body[data-page="landing-claude"] .cta-secondary-claude,
[data-theme="lightmodern"] body[data-page="landing-claude"] .cta-secondary-claude {
    color: #1a1a2e;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] body[data-page="landing-claude"] .cta-secondary-claude:hover,
[data-theme="lightmodern"] body[data-page="landing-claude"] .cta-secondary-claude:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Urgency Banner */
body[data-page="landing-claude"] .urgency-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 1em;
    font-size: 0.8125em;
    font-weight: 600;
    color: var(--urgency-red);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 100em;
    animation: fadeIn 0.5s var(--ease-smooth) 1s both;
}

body[data-page="landing-claude"] .urgency-icon {
    animation: shake 0.5s ease-in-out infinite;
}

/* Trust Badges Row */
body[data-page="landing-claude"] .trust-row {
    display: flex;
    justify-content: center;
    gap: 2em;
    margin-top: 4em;
    animation: fadeInUp 1s var(--ease-out-expo) 0.9s both;
}

body[data-page="landing-claude"] .trust-badge-claude {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

body[data-page="landing-claude"] .trust-badge-claude svg {
    width: 1.25em;
    height: 1.25em;
    opacity: 0.6;
}

/* ============================================
   SOCIAL PROOF SECTION
   ============================================ */
body[data-page="landing-claude"] .social-proof-section {
    position: relative;
    z-index: 2;
    padding: 6em 2em;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] body[data-page="landing-claude"] .social-proof-section,
[data-theme="lightmodern"] body[data-page="landing-claude"] .social-proof-section {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

body[data-page="landing-claude"] .stats-grid-claude {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2em;
    max-width: 75em;
    margin: 0 auto;
}

body[data-page="landing-claude"] .stat-item {
    text-align: center;
    padding: 2em;
}

body[data-page="landing-claude"] .stat-number-claude {
    font-family: var(--font-logo, 'Bodoni Moda'), serif;
    font-size: 3.5em;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25em;
}

body[data-page="landing-claude"] .stat-number-claude span {
    color: var(--neural-blue);
}

body[data-page="landing-claude"] .stat-label-claude {
    font-size: 0.9375em;
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* ============================================
   BENTO GRID FEATURES
   ============================================ */
body[data-page="landing-claude"] .bento-section {
    position: relative;
    z-index: 2;
    padding: 8em 2em;
}

body[data-page="landing-claude"] .section-header {
    text-align: center;
    max-width: 50em;
    margin: 0 auto 5em;
}

body[data-page="landing-claude"] .section-label {
    font-size: 0.8125em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--gold-accent);
    margin-bottom: 1em;
}

body[data-page="landing-claude"] .section-title-claude {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: clamp(2em, 4vw, 3em);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1em;
    line-height: 1.2;
}

body[data-page="landing-claude"] .section-desc {
    font-size: 1.125em;
    color: var(--text-secondary);
    line-height: 1.7;
}

body[data-page="landing-claude"] .bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 1.5em;
    max-width: 80em;
    margin: 0 auto;
}

body[data-page="landing-claude"] .bento-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(1.5em);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5em;
    padding: 2.5em;
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] body[data-page="landing-claude"] .bento-card,
[data-theme="lightmodern"] body[data-page="landing-claude"] .bento-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

body[data-page="landing-claude"] .bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--neural-gradient);
    opacity: 0;
    transition: opacity 0.3s var(--ease-smooth);
}

body[data-page="landing-claude"] .bento-card:hover {
    transform: translateY(-0.5em);
    border-color: var(--neural-blue);
    box-shadow: 0 1.5em 4em var(--glow-color);
}

body[data-page="landing-claude"] .bento-card:hover::before {
    opacity: 1;
}

/* Bento Grid Layout */
body[data-page="landing-claude"] .bento-large {
    grid-column: span 8;
    grid-row: span 2;
}

body[data-page="landing-claude"] .bento-medium {
    grid-column: span 4;
}

body[data-page="landing-claude"] .bento-small {
    grid-column: span 4;
}

body[data-page="landing-claude"] .bento-wide {
    grid-column: span 6;
}

body[data-page="landing-claude"] .bento-icon {
    font-size: 2.5em;
    margin-bottom: 1em;
    display: block;
}

body[data-page="landing-claude"] .bento-title {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75em;
}

body[data-page="landing-claude"] .bento-desc {
    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Feature Highlight Card */
body[data-page="landing-claude"] .bento-highlight {
    background: linear-gradient(135deg,
        rgba(74, 158, 255, 0.1) 0%,
        rgba(139, 92, 246, 0.1) 100%);
    border-color: rgba(74, 158, 255, 0.3);
}

/* ============================================
   CHAT DEMO SECTION
   ============================================ */
body[data-page="landing-claude"] .chat-demo-section {
    position: relative;
    z-index: 2;
    padding: 8em 2em;
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] body[data-page="landing-claude"] .chat-demo-section,
[data-theme="lightmodern"] body[data-page="landing-claude"] .chat-demo-section {
    background: rgba(0, 0, 0, 0.02);
}

body[data-page="landing-claude"] .chat-demo-container {
    max-width: 50em;
    margin: 0 auto;
}

body[data-page="landing-claude"] .chat-window {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5em;
    overflow: hidden;
    box-shadow: 0 2em 6em rgba(0, 0, 0, 0.3);
}

[data-theme="light"] body[data-page="landing-claude"] .chat-window,
[data-theme="lightmodern"] body[data-page="landing-claude"] .chat-window {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2em 6em rgba(0, 0, 0, 0.1);
}

body[data-page="landing-claude"] .chat-header {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1.25em 1.5em;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] body[data-page="landing-claude"] .chat-header,
[data-theme="lightmodern"] body[data-page="landing-claude"] .chat-header {
    background: rgba(0, 0, 0, 0.02);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body[data-page="landing-claude"] .chat-avatar {
    width: 2.5em;
    height: 2.5em;
    background: var(--neural-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

body[data-page="landing-claude"] .chat-info h4 {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

body[data-page="landing-claude"] .chat-info span {
    font-size: 0.8125em;
    color: var(--success-green);
}

body[data-page="landing-claude"] .chat-messages {
    padding: 2em;
    min-height: 20em;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

body[data-page="landing-claude"] .chat-bubble-claude {
    max-width: 80%;
    padding: 1em 1.5em;
    border-radius: 1.25em;
    font-size: 1em;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(1em);
}

body[data-page="landing-claude"] .chat-bubble-claude.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s var(--ease-out-expo);
}

body[data-page="landing-claude"] .chat-user {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom-right-radius: 0.25em;
}

[data-theme="light"] body[data-page="landing-claude"] .chat-user,
[data-theme="lightmodern"] body[data-page="landing-claude"] .chat-user {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a2e;
    border-color: rgba(0, 0, 0, 0.1);
}

body[data-page="landing-claude"] .chat-ai {
    align-self: flex-start;
    background: var(--neural-gradient);
    color: #fff;
    border-bottom-left-radius: 0.25em;
    box-shadow: 0 0.5em 2em rgba(74, 158, 255, 0.3);
}

/* ============================================
   PRICING SECTION - Anchoring
   ============================================ */
body[data-page="landing-claude"] .pricing-section-claude {
    position: relative;
    z-index: 2;
    padding: 8em 2em;
}

body[data-page="landing-claude"] .pricing-grid-claude {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20em, 1fr));
    gap: 2em;
    max-width: 70em;
    margin: 0 auto;
}

body[data-page="landing-claude"] .pricing-card-claude {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(1.5em);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5em;
    padding: 3em 2.5em;
    text-align: center;
    transition: all 0.4s var(--ease-smooth);
}

[data-theme="light"] body[data-page="landing-claude"] .pricing-card-claude,
[data-theme="lightmodern"] body[data-page="landing-claude"] .pricing-card-claude {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

body[data-page="landing-claude"] .pricing-card-claude:hover {
    transform: translateY(-0.5em);
    border-color: var(--neural-blue);
}

body[data-page="landing-claude"] .pricing-featured {
    border: 2px solid var(--neural-blue);
    box-shadow: 0 1em 4em var(--glow-color);
    transform: scale(1.05);
}

body[data-page="landing-claude"] .pricing-featured:hover {
    transform: scale(1.05) translateY(-0.5em);
}

body[data-page="landing-claude"] .pricing-badge-claude {
    position: absolute;
    top: -0.75em;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5em 1.5em;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    background: var(--neural-gradient);
    border-radius: 100em;
}

body[data-page="landing-claude"] .pricing-name-claude {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1em 0 0.5em;
}

/* Anchoring - Crossed out price */
body[data-page="landing-claude"] .pricing-anchor {
    font-size: 1.25em;
    color: var(--text-tertiary);
    text-decoration: line-through;
    margin-bottom: 0.25em;
}

body[data-page="landing-claude"] .pricing-price-claude {
    font-family: var(--font-logo, 'Bodoni Moda'), serif;
    font-size: 4em;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin: 0;
}

body[data-page="landing-claude"] .pricing-currency {
    font-size: 0.4em;
    color: var(--text-secondary);
    vertical-align: super;
}

body[data-page="landing-claude"] .pricing-period-claude {
    font-size: 0.9375em;
    color: var(--text-tertiary);
    margin: 0.5em 0 2em;
}

body[data-page="landing-claude"] .pricing-features-claude {
    list-style: none;
    padding: 0;
    margin: 0 0 2em;
    text-align: left;
}

body[data-page="landing-claude"] .pricing-features-claude li {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em 0;
    color: var(--text-primary);
    font-size: 0.9375em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="landing-claude"] .pricing-features-claude li:last-child {
    border-bottom: none;
}

body[data-page="landing-claude"] .pricing-features-claude li::before {
    content: '✓';
    color: var(--success-green);
    font-weight: 700;
}

body[data-page="landing-claude"] .pricing-cta-claude {
    width: 100%;
    padding: 1em;
    font-size: 1em;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.75em;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

[data-theme="light"] body[data-page="landing-claude"] .pricing-cta-claude,
[data-theme="lightmodern"] body[data-page="landing-claude"] .pricing-cta-claude {
    color: #1a1a2e;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body[data-page="landing-claude"] .pricing-cta-claude:hover {
    background: var(--neural-gradient);
    color: #fff;
    border-color: transparent;
}

body[data-page="landing-claude"] .pricing-cta-featured {
    background: var(--neural-gradient);
    color: #fff;
    border: none;
}

body[data-page="landing-claude"] .pricing-cta-featured:hover {
    box-shadow: 0 0.5em 2em rgba(74, 158, 255, 0.4);
}

/* ============================================
   TESTIMONIALS - Authority & Social Proof
   ============================================ */
body[data-page="landing-claude"] .testimonials-section {
    position: relative;
    z-index: 2;
    padding: 8em 2em;
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] body[data-page="landing-claude"] .testimonials-section,
[data-theme="lightmodern"] body[data-page="landing-claude"] .testimonials-section {
    background: rgba(0, 0, 0, 0.02);
}

body[data-page="landing-claude"] .testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
    max-width: 75em;
    margin: 0 auto;
}

body[data-page="landing-claude"] .testimonial-card-claude {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5em;
    padding: 2.5em;
    transition: all 0.4s var(--ease-smooth);
}

[data-theme="light"] body[data-page="landing-claude"] .testimonial-card-claude,
[data-theme="lightmodern"] body[data-page="landing-claude"] .testimonial-card-claude {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

body[data-page="landing-claude"] .testimonial-card-claude:hover {
    transform: translateY(-0.25em);
    border-color: var(--gold-accent);
}

body[data-page="landing-claude"] .testimonial-stars {
    color: var(--gold-accent);
    font-size: 1.125em;
    margin-bottom: 1.5em;
}

body[data-page="landing-claude"] .testimonial-quote {
    font-size: 1.0625em;
    color: var(--text-primary);
    line-height: 1.7;
    margin: 0 0 2em;
    font-style: italic;
}

body[data-page="landing-claude"] .testimonial-author-claude {
    display: flex;
    align-items: center;
    gap: 1em;
    padding-top: 1.5em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="landing-claude"] .testimonial-avatar {
    width: 3em;
    height: 3em;
    background: var(--neural-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

body[data-page="landing-claude"] .testimonial-info strong {
    display: block;
    font-size: 1em;
    color: var(--text-primary);
    margin-bottom: 0.25em;
}

body[data-page="landing-claude"] .testimonial-info span {
    font-size: 0.875em;
    color: var(--text-tertiary);
}

/* ============================================
   FINAL CTA - Loss Aversion
   ============================================ */
body[data-page="landing-claude"] .final-cta-section {
    position: relative;
    z-index: 2;
    padding: 8em 2em;
    text-align: center;
}

body[data-page="landing-claude"] .final-cta-content {
    max-width: 50em;
    margin: 0 auto;
}

body[data-page="landing-claude"] .final-cta-title {
    font-family: var(--font-serif, 'Noto Serif JP'), serif;
    font-size: clamp(2em, 4vw, 3em);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1em;
    line-height: 1.2;
}

body[data-page="landing-claude"] .final-cta-desc {
    font-size: 1.25em;
    color: var(--text-secondary);
    margin: 0 0 2em;
    line-height: 1.6;
}

/* Countdown Timer */
body[data-page="landing-claude"] .countdown-container {
    display: inline-flex;
    gap: 1em;
    margin-bottom: 2.5em;
    padding: 1.5em 2.5em;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 1em;
}

[data-theme="light"] body[data-page="landing-claude"] .countdown-container,
[data-theme="lightmodern"] body[data-page="landing-claude"] .countdown-container {
    background: rgba(0, 0, 0, 0.02);
}

body[data-page="landing-claude"] .countdown-item {
    text-align: center;
}

body[data-page="landing-claude"] .countdown-value {
    font-family: var(--font-logo, 'Bodoni Moda'), serif;
    font-size: 2.5em;
    font-weight: 800;
    color: var(--urgency-red);
    line-height: 1;
}

body[data-page="landing-claude"] .countdown-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-top: 0.5em;
}

/* ============================================
   FOOTER
   ============================================ */
body[data-page="landing-claude"] .footer-claude {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5em 2em 2em;
}

[data-theme="light"] body[data-page="landing-claude"] .footer-claude,
[data-theme="lightmodern"] body[data-page="landing-claude"] .footer-claude {
    background: rgba(0, 0, 0, 0.03);
    border-top-color: rgba(0, 0, 0, 0.08);
}

body[data-page="landing-claude"] .footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3em;
    max-width: 75em;
    margin: 0 auto 4em;
}

body[data-page="landing-claude"] .footer-brand-claude .logo {
    font-family: var(--font-logo, 'Bodoni Moda'), serif;
    font-size: 1.75em;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    margin-bottom: 1em;
}

body[data-page="landing-claude"] .footer-brand-claude p {
    font-size: 0.9375em;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 20em;
}

body[data-page="landing-claude"] .footer-column h5 {
    font-size: 0.8125em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    margin: 0 0 1.5em;
}

body[data-page="landing-claude"] .footer-column a {
    display: block;
    font-size: 0.9375em;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.75em;
    transition: color 0.3s var(--ease-smooth);
}

body[data-page="landing-claude"] .footer-column a:hover {
    color: var(--neural-blue);
}

body[data-page="landing-claude"] .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2em;
    border-top: 1px solid var(--glass-border);
    max-width: 75em;
    margin: 0 auto;
}

body[data-page="landing-claude"] .footer-bottom p {
    font-size: 0.875em;
    color: var(--text-tertiary);
}

body[data-page="landing-claude"] .footer-badges {
    display: flex;
    gap: 1em;
}

body[data-page="landing-claude"] .footer-badge {
    padding: 0.5em 1em;
    font-size: 0.75em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5em;
}

[data-theme="light"] body[data-page="landing-claude"] .footer-badge,
[data-theme="lightmodern"] body[data-page="landing-claude"] .footer-badge {
    color: rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-1.5em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1.5em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-0.125em); }
    75% { transform: translateX(0.125em); }
}

/* Scroll Reveal */
body[data-page="landing-claude"] .reveal {
    opacity: 0;
    transform: translateY(2em);
    transition: all 0.8s var(--ease-out-expo);
}

body[data-page="landing-claude"] .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

body[data-page="landing-claude"] .reveal-delay-1 { transition-delay: 0.1s; }
body[data-page="landing-claude"] .reveal-delay-2 { transition-delay: 0.2s; }
body[data-page="landing-claude"] .reveal-delay-3 { transition-delay: 0.3s; }
body[data-page="landing-claude"] .reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   MODE VISIBILITY
   ============================================ */
body[data-page="landing-claude"] .mode-owner { display: block; }
body[data-page="landing-claude"] .mode-vendor { display: none; }

body[data-page="landing-claude"].vendor-mode .mode-owner { display: none; }
body[data-page="landing-claude"].vendor-mode .mode-vendor { display: block; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 75em) {
    body[data-page="landing-claude"] .bento-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    body[data-page="landing-claude"] .bento-large {
        grid-column: span 6;
        grid-row: span 1;
    }

    body[data-page="landing-claude"] .bento-medium,
    body[data-page="landing-claude"] .bento-small,
    body[data-page="landing-claude"] .bento-wide {
        grid-column: span 3;
    }

    body[data-page="landing-claude"] .stats-grid-claude {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-page="landing-claude"] .testimonials-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="landing-claude"] .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 48em) {
    body[data-page="landing-claude"] .nav-claude {
        padding: 0.75em 1.25em;
        gap: 1em;
    }

    body[data-page="landing-claude"] .nav-links-claude {
        display: none;
    }

    body[data-page="landing-claude"] .hero-claude {
        padding: 7em 1.5em 4em;
    }

    body[data-page="landing-claude"] .bento-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="landing-claude"] .bento-large,
    body[data-page="landing-claude"] .bento-medium,
    body[data-page="landing-claude"] .bento-small,
    body[data-page="landing-claude"] .bento-wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    body[data-page="landing-claude"] .stats-grid-claude {
        grid-template-columns: 1fr;
        gap: 1em;
    }

    body[data-page="landing-claude"] .pricing-grid-claude {
        grid-template-columns: 1fr;
    }

    body[data-page="landing-claude"] .pricing-featured {
        transform: none;
    }

    body[data-page="landing-claude"] .pricing-featured:hover {
        transform: translateY(-0.5em);
    }

    body[data-page="landing-claude"] .trust-row {
        flex-direction: column;
        gap: 1em;
    }

    body[data-page="landing-claude"] .cta-row {
        flex-direction: column;
    }

    body[data-page="landing-claude"] .footer-grid {
        grid-template-columns: 1fr;
        gap: 2em;
    }

    body[data-page="landing-claude"] .footer-bottom {
        flex-direction: column;
        gap: 1.5em;
        text-align: center;
    }

    body[data-page="landing-claude"] .countdown-container {
        padding: 1em 1.5em;
    }

    body[data-page="landing-claude"] .countdown-value {
        font-size: 1.75em;
    }
}

@media (max-width: 30em) {
    body[data-page="landing-claude"] .hero-title-claude {
        font-size: 2.5em;
    }

    body[data-page="landing-claude"] .mode-toggle-claude {
        flex-direction: column;
        border-radius: 1em;
    }

    body[data-page="landing-claude"] .mode-btn {
        width: 100%;
    }
}

/**
 * COEUS DESIGN SYSTEM - INDEX PAGE
 *
 * PURPOSE:
 * Redirect page styles (index.html)
 * Simple centered container with loading state
 *
 * LAST UPDATED: 2025-10-26
 * VERSION: 1.0.0
 */

/* ============================================ */
/*           REDIRECT CONTAINER                 */
/* ============================================ */

body[data-page="index"] .redirect-container {

    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    padding: 50px;
    background: #212121;
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}



/* ============================================ */
/*           REDIRECT LINKS                     */
/* ============================================ */

body[data-page="index"] .redirect-links {

    margin-top: 20px;
}



body[data-page="index"] .redirect-link {

    color: #667eea;
    text-decoration: none;
    transition: opacity 0.2s;
}



body[data-page="index"] .redirect-link:hover {

    opacity: 0.8;
}



/**
 * COEUS DESIGN SYSTEM - DOCUMENTS PAGE
 *
 * PURPOSE:
 * Document management page specific styles
 * Grid view, list view, document cards, filters, and search
 *
 * LAST UPDATED: 2026-03-13
 * VERSION: 1.1.0
 *
 * CHANGES (v1.1.0):
 * - Removed all 170 !important declarations (reduced to 0)
 * - Dark theme overrides (html[data-theme]) use attribute+class specificity (0,1,1) to beat base (0,1,0)
 * - Modal text colors use .modal .modal-title (0,2,0) with cascade order to enforce white text
 * - Text alignment in viewer panels use parent .viewer-left-panel selector for specificity
 * - ID selectors (#summaryContent, #financialStatusContent) already (1,0,0) — no !important needed
 * - Responsive @media overrides use body prefix (0,0,1) to raise specificity above base classes
 */

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    min-height: 100vh;
    /* Background image is set by gradient-backgrounds.css */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* When inside app-layout with sidebar, adjust container */
.app-layout .main-content .container {
    max-width: 100%;
    margin: 0;
    padding: 2rem;
    width: 100%;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Search and Filter Container */
.search-filter-container {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    align-items: center;
}

/* Search Bar */
.search-container {
    flex: 1;
    position: relative;
    max-width: 600px;
}

/* Filter Dropdown */
.filter-container {
    position: relative;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 27px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
}

.filter-select:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

#active-filters-badge {
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #ff5e3a 0%, #ffb347 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: none;
}

#active-filters-badge.active {
    display: inline-block;
}

.filter-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 27px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-input:focus {
    outline: none;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 27px;
    padding: 4px;
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
    min-width: 280px; /* Make container wider */
}

.view-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 27px; /* Match container radius */
    cursor: pointer;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(0, 0, 0, 0.7);
    transition: all 0.2s;
    flex: 1; /* Make buttons equal width */
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.25);
    color: rgba(0, 0, 0, 0.95);
    font-weight: 600;
    /* Orange gradient glow effect - like a lamp from behind */
    box-shadow:
        inset 0 1px 0px rgba(255, 255, 255, 0.4),
        0 0 20px rgba(255, 94, 58, 0.4),
        0 0 40px rgba(255, 179, 71, 0.2),
        0 2px 8px rgba(255, 94, 58, 0.3);
}

/* Grid Zoom Slider Control */
.grid-zoom-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 27px;
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
}

.grid-zoom-control .radix-icon {
    color: var(--text-secondary);
    font-size: 1rem;
}

.grid-zoom-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.grid-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ff5e3a 0%, #ffb347 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 94, 58, 0.4);
    transition: transform 0.2s ease;
}

.grid-zoom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.grid-zoom-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ff5e3a 0%, #ffb347 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 94, 58, 0.4);
}

.grid-zoom-label {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 1.5rem;
    text-align: center;
}

/* Hide zoom control when in list view */
.grid-zoom-control.hidden {
    display: none;
}

/* Upload Button */
.upload-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 27px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Document card, preview, and grid styles now in /css/components/cards.css */

/* Document Actions and Buttons */
.document-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Noto Sans', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: all 0.2s;
}

.action-btn.delete {
    color: rgb(185, 28, 28);
}

/* Two-Column List View */
.two-column-container {
    display: flex;
    gap: 1.5rem;
    height: calc(100vh - 200px);
    min-height: 600px;
}

/* Left Column - Document List */
.documents-sidebar {
    width: 35%;
    min-width: 350px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 27px;
    padding: 1rem;
    overflow-y: auto;
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
}

/* Document List Item */
.doc-list-item {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid transparent;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.doc-list-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}

.doc-list-item.selected {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1),
                0 8px 24px rgba(59, 130, 246, 0.2);
    transform: translateX(4px);
}

/* Document Header in List */
.doc-list-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

.doc-list-icon {
    font-size: 1.5rem;
    color: #6b7280;
    min-width: 40px;
    text-align: center;
}

/* Document Type Tags */
.doc-type-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-type-tag.pdf {
    background: transparent;
    color: #6b7280;
    box-shadow: none;
}

.doc-type-tag.image {
    background: transparent;
    color: #8b5cf6;
    border: 2px solid #8b5cf6;
    box-shadow: none;
}

.doc-list-info {
    flex: 1;
    min-width: 0;
}

.doc-list-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-list-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

.doc-list-expand {
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
}

.doc-list-expand:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.doc-list-expand.expanded {
    transform: rotate(180deg);
}

/* Dropdown Details */
.doc-list-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(249, 250, 251, 0.8);
}

.doc-list-details.expanded {
    max-height: 400px;
    border-top: 1px solid rgba(229, 231, 235, 0.8);
}

.doc-detail-section {
    padding: 1rem;
}

.doc-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.doc-detail-label {
    color: #6b7280;
}

.doc-detail-value {
    color: #111827;
    font-weight: 500;
}

/* Dropdown Section Styling */
.dropdown-section {
    padding: 1rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.dropdown-section:last-child {
    border-bottom: none;
}

.dropdown-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-section-title i {
    color: #6b7280;
}

.dropdown-section-content {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.5;
}

.dropdown-section-placeholder {
    font-style: italic;
    color: #9ca3af;
}

.assignment-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.assignment-tag.vendor {
    background: #e0e7ff;
    color: #3730a3;
}

.assignment-tag.building {
    background: #ddd6fe;
    color: #6b21a8;
}

.assignment-tag.unit {
    background: #fce7f3;
    color: #a21caf;
}

.note-item {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: #374151;
}

/* Right Column - Document Preview */
.document-preview-panel {
    flex: 1;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    overflow: hidden;
}

#preview-content {
    width: 100%;
    height: 100%;
    background-color: transparent;
    display: flex;
    flex-direction: column;
}

.preview-iframe-container {
    flex: 1;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
    position: relative;
    border: none;
}

.preview-iframe-container:hover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
    transform: scale(1.03);
    transform-origin: center center;
}

/* Empty preview state */
.preview-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #9ca3af;
}

.preview-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Keyboard navigation hint */
.keyboard-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #3b82f6;
}

.keyboard-hint kbd {
    padding: 0.25rem 0.5rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon i {
    font-size: 2rem;
    color: #6366f1;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.empty-text {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    padding: 4rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg);
}
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    outline: none;
    border: none;
}

.modal.open {
    display: flex;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95); /* Whiter text for better readability */
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.modal-close:hover {
    background: #e5e7eb;
}

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
}

.upload-area:hover,
.upload-area.dragging {
    border-color: #ff5e3a; /* Orange instead of blue */
    background: rgba(255, 94, 58, 0.05); /* Subtle orange tint */
}

.upload-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.7); /* Whiter icon for readability */
    margin-bottom: 1rem;
}

.upload-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95); /* Whiter text for readability */
    margin-bottom: 0.5rem;
}

.upload-text {
    color: rgba(255, 255, 255, 0.75); /* Whiter text for readability */
    margin-bottom: 1rem;
}

/* File List */
.file-list {
    margin-top: 1.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.file-icon {
    margin-right: 0.75rem;
    color: #6b7280;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #111827;
}

.file-size {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Upload Preview Grid */
.upload-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.upload-preview-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-preview-thumbnail {
    width: 100%;
    height: 150px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.upload-preview-thumbnail .file-icon {
    font-size: 3rem;
    color: #9ca3af;
}

.upload-preview-info {
    padding: 0.5rem;
}

.upload-preview-info .file-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-preview-info .file-size {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    transition: width 0.3s;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

/* ========================================
   DARK THEME OVERRIDES
   All darkmodern/dark/darkart themes
   ======================================== */

/* Header controls - search, filter, view toggle, upload */
html[data-theme="dark"] .filter-select,
html[data-theme="dark"] .search-input,
html[data-theme="dark"] .view-btn,
html[data-theme="dark"] .upload-btn,
html[data-theme="darkmodern"] .filter-select,
html[data-theme="darkmodern"] .search-input,
html[data-theme="darkmodern"] .view-btn,
html[data-theme="darkmodern"] .upload-btn,
html[data-theme="darkart"] .filter-select,
html[data-theme="darkart"] .search-input,
html[data-theme="darkart"] .view-btn,
html[data-theme="darkart"] .upload-btn {
    color: rgba(255, 255, 255, 0.95);
}

html[data-theme="dark"] .view-btn.active,
html[data-theme="darkmodern"] .view-btn.active,
html[data-theme="darkart"] .view-btn.active {
    color: rgba(255, 255, 255, 0.95);
}

html[data-theme="dark"] .search-icon,
html[data-theme="dark"] .filter-icon,
html[data-theme="darkmodern"] .search-icon,
html[data-theme="darkmodern"] .filter-icon,
html[data-theme="darkart"] .search-icon,
html[data-theme="darkart"] .filter-icon {
    color: rgba(255, 255, 255, 0.6);
}

/* Filter panel */
html[data-theme="dark"] .filter-panel-title,
html[data-theme="darkmodern"] .filter-panel-title,
html[data-theme="darkart"] .filter-panel-title {
    color: rgba(255, 255, 255, 0.95);
}

html[data-theme="dark"] .filter-section-title,
html[data-theme="darkmodern"] .filter-section-title,
html[data-theme="darkart"] .filter-section-title {
    color: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .filter-option-label,
html[data-theme="darkmodern"] .filter-option-label,
html[data-theme="darkart"] .filter-option-label {
    color: rgba(255, 255, 255, 0.85);
}

html[data-theme="dark"] .filter-clear-btn,
html[data-theme="darkmodern"] .filter-clear-btn,
html[data-theme="darkart"] .filter-clear-btn {
    color: #60a5fa;
}

/* Dropdown controls */
html[data-theme="dark"] .dropdown-toggle,
html[data-theme="dark"] .dropdown-toggle .dropdown-label,
html[data-theme="darkmodern"] .dropdown-toggle,
html[data-theme="darkmodern"] .dropdown-toggle .dropdown-label,
html[data-theme="darkart"] .dropdown-toggle,
html[data-theme="darkart"] .dropdown-toggle .dropdown-label {
    color: rgba(255, 255, 255, 0.95);
}

html[data-theme="dark"] .dropdown-toggle i,
html[data-theme="darkmodern"] .dropdown-toggle i,
html[data-theme="darkart"] .dropdown-toggle i {
    color: rgba(255, 255, 255, 0.6);
}

/* Date inputs */
html[data-theme="dark"] .date-input,
html[data-theme="dark"] .date-label,
html[data-theme="dark"] .custom-date-input,
html[data-theme="dark"] .custom-date-label,
html[data-theme="darkmodern"] .date-input,
html[data-theme="darkmodern"] .date-label,
html[data-theme="darkmodern"] .custom-date-input,
html[data-theme="darkmodern"] .custom-date-label,
html[data-theme="darkart"] .date-input,
html[data-theme="darkart"] .date-label,
html[data-theme="darkart"] .custom-date-input,
html[data-theme="darkart"] .custom-date-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Document list sidebar */
html[data-theme="dark"] .doc-list-title,
html[data-theme="darkmodern"] .doc-list-title,
html[data-theme="darkart"] .doc-list-title {
    color: rgba(255, 255, 255, 0.95);
}

html[data-theme="dark"] .doc-list-meta,
html[data-theme="dark"] .doc-list-icon,
html[data-theme="darkmodern"] .doc-list-meta,
html[data-theme="darkmodern"] .doc-list-icon,
html[data-theme="darkart"] .doc-list-meta,
html[data-theme="darkart"] .doc-list-icon {
    color: rgba(255, 255, 255, 0.6);
}

html[data-theme="dark"] .doc-list-item,
html[data-theme="darkmodern"] .doc-list-item,
html[data-theme="darkart"] .doc-list-item {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .doc-list-item:hover,
html[data-theme="darkmodern"] .doc-list-item:hover,
html[data-theme="darkart"] .doc-list-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .doc-list-item.selected,
html[data-theme="darkmodern"] .doc-list-item.selected,
html[data-theme="darkart"] .doc-list-item.selected {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Dropdown details */
html[data-theme="dark"] .doc-list-details,
html[data-theme="darkmodern"] .doc-list-details,
html[data-theme="darkart"] .doc-list-details {
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .dropdown-section-title,
html[data-theme="dark"] .doc-detail-value,
html[data-theme="darkmodern"] .dropdown-section-title,
html[data-theme="darkmodern"] .doc-detail-value,
html[data-theme="darkart"] .dropdown-section-title,
html[data-theme="darkart"] .doc-detail-value {
    color: rgba(255, 255, 255, 0.95);
}

html[data-theme="dark"] .dropdown-section-content,
html[data-theme="dark"] .doc-detail-label,
html[data-theme="dark"] .dropdown-section-title i,
html[data-theme="darkmodern"] .dropdown-section-content,
html[data-theme="darkmodern"] .doc-detail-label,
html[data-theme="darkmodern"] .dropdown-section-title i,
html[data-theme="darkart"] .dropdown-section-content,
html[data-theme="darkart"] .doc-detail-label,
html[data-theme="darkart"] .dropdown-section-title i {
    color: rgba(255, 255, 255, 0.6);
}

/* Empty state */
html[data-theme="dark"] .empty-state,
html[data-theme="darkmodern"] .empty-state,
html[data-theme="darkart"] .empty-state {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .empty-title,
html[data-theme="darkmodern"] .empty-title,
html[data-theme="darkart"] .empty-title {
    color: rgba(255, 255, 255, 0.95);
}

html[data-theme="dark"] .empty-text,
html[data-theme="darkmodern"] .empty-text,
html[data-theme="darkart"] .empty-text {
    color: rgba(255, 255, 255, 0.6);
}

/* Selection toolbar */
html[data-theme="dark"] .selection-toolbar,
html[data-theme="darkmodern"] .selection-toolbar,
html[data-theme="darkart"] .selection-toolbar {
    background: rgba(30, 30, 35, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .selection-count,
html[data-theme="darkmodern"] .selection-count,
html[data-theme="darkart"] .selection-count {
    color: rgba(255, 255, 255, 0.95);
}

html[data-theme="dark"] .toolbar-divider,
html[data-theme="darkmodern"] .toolbar-divider,
html[data-theme="darkart"] .toolbar-divider {
    background: rgba(255, 255, 255, 0.2);
}

/* Select all container */
html[data-theme="dark"] .select-all-container,
html[data-theme="darkmodern"] .select-all-container,
html[data-theme="darkart"] .select-all-container {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .select-all-container:hover,
html[data-theme="darkmodern"] .select-all-container:hover,
html[data-theme="darkart"] .select-all-container:hover {
    background: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .select-all-text,
html[data-theme="darkmodern"] .select-all-text,
html[data-theme="darkart"] .select-all-text {
    color: rgba(255, 255, 255, 0.9);
}

/* File upload items */
html[data-theme="dark"] .file-item,
html[data-theme="darkmodern"] .file-item,
html[data-theme="darkart"] .file-item {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .file-name,
html[data-theme="darkmodern"] .file-name,
html[data-theme="darkart"] .file-name {
    color: rgba(255, 255, 255, 0.95);
}

html[data-theme="dark"] .file-size,
html[data-theme="dark"] .file-icon,
html[data-theme="darkmodern"] .file-size,
html[data-theme="darkmodern"] .file-icon,
html[data-theme="darkart"] .file-size,
html[data-theme="darkart"] .file-icon {
    color: rgba(255, 255, 255, 0.6);
}

/* Modal close button for dark theme */
html[data-theme="dark"] .modal-close,
html[data-theme="darkmodern"] .modal-close,
html[data-theme="darkart"] .modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

html[data-theme="dark"] .modal-close:hover,
html[data-theme="darkmodern"] .modal-close:hover,
html[data-theme="darkart"] .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modal content padding for team/add modals */
body[data-page="dokumente"] .modal-content {
    padding: var(--spacing-lg);
}

/* Toast - Theme Aware (uses design tokens for all themes) */
.toast {
    position: fixed;
    bottom: 2em;
    right: 2em;
    background: var(--glass-secondary);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: var(--text-primary);
    padding: 0.75em 1.25em;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0.625em 1.5em rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75em;
    transform: translateX(25em);
    transition: transform 0.3s;
    z-index: var(--z-toast);
    max-width: 22em;
    font-size: calc(0.875em * var(--font-scale, 1));
}

.toast.show {
    transform: translateX(0);
}

.toast.success { border-left: 0.25em solid var(--ios-system-green); }
.toast.error   { border-left: 0.25em solid var(--ios-system-red); }
.toast.info    { border-left: 0.25em solid var(--ios-system-orange); }
.toast.warning { border-left: 0.25em solid var(--accent-warning); }

.toast-icon { font-size: 1.25em; }
.toast.success .toast-icon { color: var(--ios-system-green); }
.toast.error .toast-icon   { color: var(--ios-system-red); }
.toast.info .toast-icon    { color: var(--ios-system-orange); }
.toast.warning .toast-icon { color: var(--accent-warning); }

/* Selection Toolbar */
.selection-toolbar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    gap: 1rem;
    z-index: 60;
}

.selection-toolbar.show {
    display: flex;
}

.selection-count {
    font-weight: 600;
    color: #111827;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: #e5e7eb;
}

/* Checkbox Styles */
.doc-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.doc-checkbox:hover {
    border-color: #3b82f6;
}

.doc-checkbox.checked {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-color: #3b82f6;
}

.doc-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select-all-container {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.select-all-container:hover {
    background: rgba(255, 255, 255, 0.8);
}

.select-all-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

/* Filter Panel */
.filter-panel {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 27px;
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
}

.filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.filter-panel-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
    margin: 0;
    font-family: 'Noto Sans', sans-serif;
}

.filter-clear-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #3b82f6;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Noto Sans', sans-serif;
    transition: all 0.2s;
}

.filter-clear-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.filter-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.8);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Noto Sans', sans-serif;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.2s;
}

.filter-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-option-label {
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.8);
    font-family: 'Noto Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Custom Date Range */
.custom-date-range-container {
    display: none;
    margin-left: 2rem;
    margin-top: 0.5rem;
    gap: 0.5rem;
    flex-direction: column;
}

.custom-date-range-container.active {
    display: flex;
}

.custom-date-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.custom-date-label {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
    font-family: 'Noto Sans', sans-serif;
    font-weight: 500;
}

.custom-date-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.custom-date-input:focus {
    outline: none;
    border-color: #f97316;
}

/* Filter Dropdown Section (New Multi-Select Dropdowns) */
.filter-dropdown-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-toggle {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: all 0.2s;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.dropdown-toggle:focus {
    outline: none;
    border-color: #3b82f6;
}

.dropdown-toggle .dropdown-label {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-toggle i {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
    transition: transform 0.2s;
}

.dropdown-toggle.open i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 100;
    display: none;
    padding: 0.5rem;
}

.dropdown-menu.open {
    display: block;
    animation: dropdownSlideIn 0.2s ease-out;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
}
    to {
        opacity: 1;
        transform: translateY(0);
}
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.8);
    font-family: 'Noto Sans', sans-serif;
}

.dropdown-option:hover {
    background: rgba(59, 130, 246, 0.1);
}

.dropdown-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.dropdown-option span {
    flex: 1;
    user-select: none;
}

/* Date Range Filter */
.date-range-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 120px;
}

.date-label {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
    font-family: 'Noto Sans', sans-serif;
    font-weight: 500;
}

.date-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
    transition: all 0.2s;
}

.date-input:hover {
    background: rgba(255, 255, 255, 0.12);
}

.date-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Modal Variations */
/* Higher specificity (0,2,0) to override .modal-content (0,1,0) */
.modal-content.modal-two-column {
    max-width: 60em;
    width: 90vw;
    height: 85vh;
    max-height: 85vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header-bordered {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.modal-subtitle {
    color: #6b7280;
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    font-family: 'Noto Sans', sans-serif;
}

.modal-split-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ========================================
   DOCUMENT VIEWER LEFT PANEL
   Theme-aware styling for document modal
   ======================================== */

.viewer-left-panel {
    width: 40%;
    min-width: 300px;
    border-right: 1px solid var(--glass-border, #e5e7eb);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--viewer-panel-bg, #f9fafb);
    padding: 0;
    text-align: left;
    direction: ltr;
}

/* Theme backgrounds for viewer panel */
[data-theme="light"] .viewer-left-panel,
[data-theme="lightmodern"] .viewer-left-panel,
[data-theme="lightart"] .viewer-left-panel {
    background: #f9fafb;
}

[data-theme="dark"] .viewer-left-panel,
[data-theme="darkmodern"] .viewer-left-panel,
[data-theme="darkart"] .viewer-left-panel {
    background: rgba(30, 30, 35, 0.95);
    border-right-color: rgba(255, 255, 255, 0.1);
}

[data-theme="colors"] .viewer-left-panel {
    background: rgba(255, 255, 255, 0.95);
}

/* Viewer Section Container */
.viewer-section {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border, #e5e7eb);
    margin: 0;
    text-align: left;
    box-sizing: border-box;
}

[data-theme="dark"] .viewer-section,
[data-theme="darkmodern"] .viewer-section,
[data-theme="darkart"] .viewer-section {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Section Header (title + button row) */
.viewer-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    text-align: left;
    flex-wrap: wrap;
}

/* Section Titles - CONSISTENT COLOR */
.viewer-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    font-family: 'Noto Sans', sans-serif;
    margin: 0;
    padding: 0;
    text-align: left;
    flex-shrink: 0;
}

/* Theme-aware section titles */
[data-theme="dark"] .viewer-section-title,
[data-theme="darkmodern"] .viewer-section-title,
[data-theme="darkart"] .viewer-section-title {
    color: rgba(255, 255, 255, 0.95);
}

[data-theme="colors"] .viewer-section-title {
    color: #1e293b;
}

/* Standalone section title (not in header) */
.viewer-section > .viewer-section-title {
    margin-bottom: 0.875rem;
}

/* ========================================
   DETAIL GRID (Label: Value rows)
   ======================================== */

.viewer-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.viewer-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.viewer-detail-label {
    color: #6b7280;
    font-size: 0.875rem;
    font-family: 'Noto Sans', sans-serif;
    flex-shrink: 0;
}

[data-theme="dark"] .viewer-detail-label,
[data-theme="darkmodern"] .viewer-detail-label,
[data-theme="darkart"] .viewer-detail-label {
    color: rgba(255, 255, 255, 0.6);
}

.viewer-detail-value {
    color: #111827;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Noto Sans', sans-serif;
    text-align: right;
    word-break: break-word;
}

[data-theme="dark"] .viewer-detail-value,
[data-theme="darkmodern"] .viewer-detail-value,
[data-theme="darkart"] .viewer-detail-value {
    color: rgba(255, 255, 255, 0.95);
}

/* Status Badge */
.status-badge {
    padding: 0.25rem 0.75rem;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Noto Sans', sans-serif;
}

[data-theme="dark"] .status-badge,
[data-theme="darkmodern"] .status-badge,
[data-theme="darkart"] .status-badge {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

/* ========================================
   ASSIGNMENT CHIPS
   ======================================== */

.assignment-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: flex-start;
}

.viewer-detail-row .assignment-chips-container {
    justify-content: flex-end;
}

/* ========================================
   AI SUMMARY SECTION
   ======================================== */

#summaryContent {
    text-align: left;
    direction: ltr;
    width: 100%;
    display: block;
}

/* Summary Card - the generated AI summary */
.summary-card {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1rem;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.summary-card p {
    margin: 0;
    text-align: left;
    line-height: 1.6;
    color: #374151;
    font-size: 0.875rem;
}

[data-theme="dark"] .summary-card,
[data-theme="darkmodern"] .summary-card,
[data-theme="darkart"] .summary-card {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .summary-card p,
[data-theme="darkmodern"] .summary-card p,
[data-theme="darkart"] .summary-card p {
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   FINANCIAL STATUS SECTION
   ======================================== */

#financialStatusContent {
    text-align: left;
}

#financialStatusContent p {
    text-align: left;
    margin: 0;
}

/* ========================================
   ASSIGNMENTS SECTION
   ======================================== */

.assignment-container {
    min-height: 40px;
    padding: 0.75rem;
    background: var(--glass-primary, white);
    border: 1px solid var(--glass-border, #e5e7eb);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
}

/* Light themes */
[data-theme="light"] .assignment-container,
[data-theme="lightmodern"] .assignment-container {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Dark themes */
[data-theme="dark"] .assignment-container,
[data-theme="darkmodern"] .assignment-container,
[data-theme="darkart"] .assignment-container {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.assignment-placeholder {
    color: var(--text-tertiary, #9ca3af);
    font-size: 0.875rem;
    font-style: italic;
    font-family: 'Noto Sans', sans-serif;
}

/* Light theme placeholders */
[data-theme="light"] .assignment-placeholder,
[data-theme="lightmodern"] .assignment-placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* Dark theme placeholders */
[data-theme="dark"] .assignment-placeholder,
[data-theme="darkmodern"] .assignment-placeholder,
[data-theme="darkart"] .assignment-placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Assignment Labels */
.assignment-select-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 0.375rem;
    font-family: 'Noto Sans', sans-serif;
}

/* Light theme labels */
[data-theme="light"] .assignment-select-label,
[data-theme="lightmodern"] .assignment-select-label {
    color: rgba(0, 0, 0, 0.7);
}

/* Dark theme labels */
[data-theme="dark"] .assignment-select-label,
[data-theme="darkmodern"] .assignment-select-label,
[data-theme="darkart"] .assignment-select-label {
    color: rgba(255, 255, 255, 0.85);
}

/* Assignment Select Dropdowns */
.assignment-select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--glass-border, #e5e7eb);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--glass-primary, white);
    color: var(--text-primary, #374151);
    font-family: 'Noto Sans', sans-serif;
    cursor: pointer;
}

/* Light theme selects */
[data-theme="light"] .assignment-select,
[data-theme="lightmodern"] .assignment-select {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
    color: rgba(0, 0, 0, 0.85);
}

/* Dark theme selects */
[data-theme="dark"] .assignment-select,
[data-theme="darkmodern"] .assignment-select,
[data-theme="darkart"] .assignment-select {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

/* Select option styling for light themes */
[data-theme="light"] .assignment-select option,
[data-theme="lightmodern"] .assignment-select option {
    background: #ffffff;
    color: rgba(0, 0, 0, 0.85);
}

/* Select option styling for dark themes */
[data-theme="dark"] .assignment-select option,
[data-theme="darkmodern"] .assignment-select option,
[data-theme="darkart"] .assignment-select option {
    background: #1f2937;
    color: rgba(255, 255, 255, 0.9);
}

.assignment-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.assignment-select-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ========================================
   NOTES SECTION
   ======================================== */

.note-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.note-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    resize: vertical;
    font-family: 'Noto Sans', sans-serif;
    background: white;
    color: #374151;
}

[data-theme="dark"] .note-textarea,
[data-theme="darkmodern"] .note-textarea,
[data-theme="darkart"] .note-textarea {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.note-textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

/* ========================================
   PLACEHOLDER TEXT
   ======================================== */

.text-placeholder {
    color: #9ca3af;
    font-size: 0.875rem;
    font-style: italic;
    font-family: 'Noto Sans', sans-serif;
    text-align: left;
}

[data-theme="dark"] .text-placeholder,
[data-theme="darkmodern"] .text-placeholder,
[data-theme="darkart"] .text-placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   FORCE LEFT ALIGNMENT
   Override any conflicting styles
   ======================================== */

.viewer-left-panel p,
.viewer-left-panel .text-secondary,
.viewer-left-panel .text-sm {
    text-align: left;
    direction: ltr;
}

/* Assignment Chip Styles */
.assignment-chip {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Noto Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.assignment-chip i {
    font-size: 0.7rem;
}

/* Estate Chip - Blue */
.assignment-chip.estate {
    background: var(--estate-chip-bg, #dbeafe);
    color: var(--estate-chip-text, #1e40af);
}

body[data-theme="dark"] .assignment-chip.estate {
    background: rgba(30, 64, 175, 0.25);
    color: rgba(219, 234, 254, 1);
}

body[data-theme="colors"] .assignment-chip.estate {
    background: rgba(30, 64, 175, 0.2);
    color: rgba(30, 64, 175, 1);
}

/* Vendor Chip - Purple */
.assignment-chip.vendor {
    background: var(--vendor-chip-bg, #f3e8ff);
    color: var(--vendor-chip-text, #7c3aed);
}

body[data-theme="dark"] .assignment-chip.vendor {
    background: rgba(124, 58, 237, 0.25);
    color: rgba(243, 232, 255, 1);
}

body[data-theme="colors"] .assignment-chip.vendor {
    background: rgba(124, 58, 237, 0.2);
    color: rgba(124, 58, 237, 1);
}

/* Building Chip - Orange */
.assignment-chip.building {
    background: var(--building-chip-bg, #ffedd5);
    color: var(--building-chip-text, #c2410c);
}

body[data-theme="dark"] .assignment-chip.building {
    background: rgba(194, 65, 12, 0.25);
    color: rgba(255, 237, 213, 1);
}

body[data-theme="colors"] .assignment-chip.building {
    background: rgba(194, 65, 12, 0.2);
    color: rgba(194, 65, 12, 1);
}

/* Unit Chip - Teal */
.assignment-chip.unit {
    background: var(--unit-chip-bg, #ccfbf1);
    color: var(--unit-chip-text, #0f766e);
}

body[data-theme="dark"] .assignment-chip.unit {
    background: rgba(15, 118, 110, 0.25);
    color: rgba(204, 251, 241, 1);
}

body[data-theme="colors"] .assignment-chip.unit {
    background: rgba(15, 118, 110, 0.2);
    color: rgba(15, 118, 110, 1);
}

/* Note Input Wrapper */
.note-input-wrapper {
    display: none;
    margin-bottom: 1rem;
}

.note-input-wrapper.visible {
    display: block;
}

.note-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.note-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.note-item-wrapper {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    position: relative;
}

[data-theme="dark"] .note-item-wrapper,
[data-theme="darkmodern"] .note-item-wrapper,
[data-theme="darkart"] .note-item-wrapper {
    background: rgba(255, 255, 255, 0.05);
}

.note-text {
    margin: 0;
    font-size: 0.875rem;
    color: #374151;
    font-family: 'Noto Sans', sans-serif;
}

[data-theme="dark"] .note-text,
[data-theme="darkmodern"] .note-text,
[data-theme="darkart"] .note-text {
    color: rgba(255, 255, 255, 0.9);
}

.note-date {
    margin: 0.25rem 0 0 0;
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: 'Noto Sans', sans-serif;
}

[data-theme="dark"] .note-date,
[data-theme="darkmodern"] .note-date,
[data-theme="darkart"] .note-date {
    color: rgba(255, 255, 255, 0.4);
}

.note-delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
}

/* Document Viewer Right Panel */
.viewer-right-panel {
    width: 60%;
    background: white;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Important for flex child */
    overflow: hidden;
}

.viewer-preview-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.viewer-preview-actions {
    display: flex;
    gap: 0.5rem;
}

.viewer-preview-content {
    flex: 1;
    padding: 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Important for flex child */
}

.viewer-iframe {
    width: 100%;
    height: 100%;
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-height: 0; /* Important for flex child */
}

/* Modal Footer */
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Dropdown Action Section */
.dropdown-action-section {
    border-bottom: none;
}

.dropdown-action-buttons {
    display: flex;
    gap: 0.5rem;
}

.dropdown-action-btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.85rem;
}

/* Loading States */
.preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
}

.preview-loading-content {
    text-align: center;
}

.preview-loading-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.preview-loading-text {
    font-family: 'Noto Sans', sans-serif;
}

/* Delete Modal Variant */
.delete-modal-content {
    max-width: 450px;
}

.delete-warning-text {
    color: var(--text-secondary, #6b7280);
    margin-bottom: 1.5rem;
    font-family: 'Noto Sans', sans-serif;
}

.delete-doc-highlight {
    padding: 0.75rem;
    background: var(--warning-bg, rgba(254, 242, 242, 1));
    color: var(--warning-text, rgba(127, 29, 29, 1));
    border: 1px solid var(--warning-border, rgba(254, 202, 202, 1));
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-family: 'Noto Sans', sans-serif;
}

/* Dark theme overrides for delete modal */
body[data-theme="dark"] .delete-warning-text {
    color: rgba(209, 213, 219, 0.95);
}

body[data-theme="dark"] .delete-doc-highlight {
    background: rgba(127, 29, 29, 0.25);
    color: rgba(254, 202, 202, 1);
    border-color: rgba(127, 29, 29, 0.5);
}

/* Colors theme overrides for delete modal */
body[data-theme="colors"] .delete-warning-text {
    color: var(--text-secondary, #6b7280);
}

body[data-theme="colors"] .delete-doc-highlight {
    background: rgba(254, 242, 242, 0.95);
    color: rgba(127, 29, 29, 1);
    border-color: rgba(254, 202, 202, 1);
}

/* ========================================
   MODAL TEXT COLORS - ALWAYS LIGHT (modal has dark glass background)
   The modal background is dark regardless of page theme, so text must be light.
   Using .modal ancestor selector (0,2,0) to beat theme class overrides (0,2,0)
   via cascade order — this block appears after theme rules so it wins.
   ======================================== */

/* Modal title - always white for contrast against dark modal background */
.modal .modal-title {
    color: rgba(255, 255, 255, 0.95);
}

.modal .modal-subtitle {
    color: rgba(255, 255, 255, 0.75);
}

/* Upload area text - always light for dark modal background */
.modal .upload-title {
    color: rgba(255, 255, 255, 0.95);
}

.modal .upload-text {
    color: rgba(255, 255, 255, 0.75);
}

.modal .upload-icon {
    color: rgba(255, 255, 255, 0.7);
}

/* Additional Helper Classes */
.text-placeholder {
    color: #9ca3af;
    font-size: 0.875rem;
    font-style: italic;
    font-family: 'Noto Sans', sans-serif;
}

.flex-1 {
    flex: 1;
}

.icon-with-margin {
    margin-right: 0.5rem;
}

.small-btn-padding {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.medium-btn-padding {
    padding: 0.5rem 1rem;
}

.full-width-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.5rem;
    font-size: 0.875rem;
}

.margin-bottom-1 {
    margin-bottom: 1rem;
}

/* Mobile and Tablet Responsive Styles */
/* Using body prefix (0,0,1 element) to raise specificity above base class rules (0,1,0) */
@media (max-width: 1024px) {
    /* Adjust container padding - extra bottom padding for fixed search */
    body .container {
        padding: 0.75rem;
        padding-bottom: 80px; /* Space for fixed search bar at bottom */
        max-width: 100%;
}

    /* Responsive grid for documents on mobile/tablet */
    body .documents-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.5rem;
        width: 100%;
}

    /* Single column in narrow landscape mode */
    @media (max-width: 1024px) and (max-height: 600px) {
        body .documents-grid {
            grid-template-columns: 1fr;
}
}

    /* Mobile Document Button Styles */
    body .document-actions {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0 0.5rem 0.5rem 0.5rem;
}

    body .action-btn {
        font-size: 0.7rem;
        padding: 0.5rem 0.75rem;
        border-radius: 12px;
}

    /* Open button takes 7/8 of space */
    body .document-actions .action-btn:not(.delete) {
        flex: 7;
}

    /* Delete button takes 1/8 of space with trash icon */
    body .document-actions .action-btn.delete {
        flex: 1;
        padding: 0.5rem;
        min-width: 40px;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
}

    /* Document preview styles removed - now in /css/components/cards.css */

    /* Subtle swipe indicator for menu on mobile */
    body::before {
        content: '';
        position: fixed;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 60px;
        background: linear-gradient(
            to right,
            rgba(255, 255, 255, 0.4),
            rgba(255, 255, 255, 0)
        );
        border-radius: 0 4px 4px 0;
        z-index: 999;
        pointer-events: none;
        opacity: 0.5;
}

    /* MOBILE: Hide all navigation/menu elements */
    /* Hide by class patterns */
    [class*="menu"]:not(.filter-select),
    [class*="hamburger"],
    [class*="nav-toggle"],
    [class*="sidebar-toggle"],
    /* Hide by aria labels */
    button[aria-label*="menu" i],
    button[aria-label*="navigation" i],
    button[aria-label*="sidebar" i],
    button[aria-label*="toggle" i]:not(#toggle-filters-btn),
    /* Hide all header buttons except our specific ones */
    .header button:not(#toggle-filters-btn):not(#grid-view-btn):not(#list-view-btn):not(.upload-btn):not(.view-btn):not(.filter-select),
    /* Hide container's first button if not our controls */
    .container > button:not(#grid-view-btn):not(#list-view-btn):not(#toggle-filters-btn):not(.upload-btn),
    /* Hide any orphaned buttons */
    button:not([id]):not([class]),
    /* Specifically hide buttons with fa-bars icon (hamburger) */
    button .fa-bars,
    button:has(.fa-bars) {
        display: none;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        width: 0;
        height: 0;
        margin: 0;
        padding: 0;
}

    /* Adjust header for mobile */
    body .header {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
        margin-bottom: 1rem;
        padding-top: 0;
}

    /* Hide search-filter-container from header flow on mobile */
    body .search-filter-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        padding: 1.5rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) 0.75rem;
        margin: 0;
        z-index: 1000;
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 40%, rgba(255, 255, 255, 0.85) 70%, rgba(255, 255, 255, 1) 100%);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-radius: 0;
        box-shadow: none;
        gap: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
}

    /* Hide filter button on mobile - it's in the header menu instead */
    #toggle-filters-btn {
        display: none;
}

    /* Search container styling within the fixed container */
    body .search-container {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        flex: 0 1 auto; /* Override base flex: 1 to prevent expansion */
        width: 80%;
        max-width: 600px;
        padding: 0;
        margin: 0 auto;
        /* Match glass effect of other containers */
        background: transparent;
        z-index: auto;
}

    /* Remove gradient from search-container since it's now on parent */
    body .search-container::before {
        display: none;
}

    body .search-input {
        font-size: 0.875rem;
        padding: 0.75rem 1rem 0.75rem 2.75rem;
        width: 100%;
        box-sizing: border-box;
        /* Glass effect matching other containers */
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 27px;
        box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
}

    body .search-icon {
        left: 1rem;
        font-size: 1rem;
        z-index: 10;
}

    body .filter-select {
        font-size: 0.875rem;
        padding: 0.65rem 1rem;
}

    /* Hide view toggle on mobile/tablet - only grid view allowed */
    body .view-toggle {
        display: none;
}

    body .view-btn {
        flex: 1;
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        background: transparent;
        box-shadow: none;
}

    body .view-btn.active {
        background: rgba(255, 255, 255, 0.25);
        color: rgba(0, 0, 0, 0.95);
        box-shadow:
            inset 0 1px 0px rgba(255, 255, 255, 0.4),
            0 0 20px rgba(255, 94, 58, 0.4),
            0 0 40px rgba(255, 179, 71, 0.2),
            0 2px 8px rgba(255, 94, 58, 0.3);
}

    body .upload-btn {
        width: auto;
        flex-basis: auto;
        justify-content: center;
        font-size: 0.875rem;
        padding: 0.65rem 1.25rem;
        margin-top: 0.5rem;
        margin-left: auto;
}

    /* Hide checkbox on mobile for cleaner look */
    body .card-checkbox-wrapper {
        display: none;
}
}

/* Extra small mobile (iPhone SE, etc) */
@media (max-width: 375px) {
    body .container {
        padding: 0.5rem;
        padding-bottom: 80px; /* Keep space for fixed search */
}

    /* Document styles moved to global-theme.css @media (max-width: 480px) */
    /* Document preview styles now in /css/components/cards.css */
}
/* Dark theme overrides for dropdowns and filter panel
   Using higher specificity with full element path
   Specificity: body[attr] + #id + .class + .class = (1,3,1) */
body[data-theme="dark"] .modal-content .filter-panel-title,
body[data-theme="dark"] #filter-panel .filter-panel-header .filter-panel-title {
    color: rgba(255, 255, 255, 0.95);
}

body[data-theme="dark"] .modal-content .filter-section-title,
body[data-theme="dark"] #filter-panel .filter-grid .filter-section-title {
    color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] body[data-theme="dark"] .modal-content .dropdown-toggle .dropdown-label,
body[data-theme="dark"] #filter-panel .dropdown-toggle .dropdown-label {
    color: rgba(255, 255, 255, 0.95);
}

body[data-theme="dark"] body[data-theme="dark"] .modal-content .dropdown-option,
body[data-theme="dark"] #filter-panel .dropdown-option {
    color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] body[data-theme="dark"] .modal-content .date-label,
body[data-theme="dark"] #filter-panel .date-label {
    color: rgba(255, 255, 255, 0.75);
}

body[data-theme="dark"] body[data-theme="dark"] /* Colors theme overrides for dropdowns and filter panel
   Using higher specificity with full element path
   Specificity: body[attr] + #id + .class + .class = (1,3,1) */
body[data-theme="colors"] .modal-content .filter-panel-title,
body[data-theme="colors"] #filter-panel .filter-panel-header .filter-panel-title {
    color: rgba(255, 255, 255, 0.95);
}

body[data-theme="colors"] .modal-content .filter-section-title,
body[data-theme="colors"] #filter-panel .filter-grid .filter-section-title {
    color: rgba(255, 255, 255, 0.9);
}

body[data-theme="colors"] body[data-theme="colors"] .modal-content .dropdown-toggle .dropdown-label,
body[data-theme="colors"] #filter-panel .dropdown-toggle .dropdown-label {
    color: var(--text-primary);
}

body[data-theme="colors"] body[data-theme="colors"] .modal-content .date-label,
body[data-theme="colors"] #filter-panel .date-label {
    color: rgba(255, 255, 255, 0.75);
}

body[data-theme="colors"] body[data-theme="colors"] 
/**
 * COEUS DESIGN SYSTEM - ADMIN DASHBOARD PAGE
 *
 * PURPOSE:
 * Admin dashboard page specific styles
 * Mobile-first responsive design, glassmorphism effects, stat cards
 *
 * LAST UPDATED: 2025-10-26
 * VERSION: 1.0.0
 */

/* Admin Header */
body[data-page="admin-dashboard"] .admin-header {

    background: var(--glass-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-3);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="admin-dashboard"] .admin-header-container {

    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 32px;
}



body[data-page="admin-dashboard"] .admin-header-content {

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}



body[data-page="admin-dashboard"] .admin-header-left {

    display: flex;
    align-items: center;
    gap: 24px;
}



body[data-page="admin-dashboard"] .admin-header-right {

    display: flex;
    align-items: center;
    gap: 24px;
}



body[data-page="admin-dashboard"] .admin-header-title {

    background: linear-gradient(135deg, var(--orange-9), var(--orange-10));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}



body[data-page="admin-dashboard"] .admin-badge {

    font-weight: 600;
    padding: 6px 14px;
    font-size: 13px;
}



body[data-page="admin-dashboard"] .admin-email {

    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}



body[data-page="admin-dashboard"] .admin-header-btn {

    padding: 10px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}



body[data-page="admin-dashboard"] .admin-header-btn i {

    margin-right: 8px;
    font-size: 14px;
}



/* Theme-aware header buttons */
body[data-page="admin-dashboard"] .admin-btn-back {

    background: var(--glass-secondary);
    color: var(--orange-10);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}



body[data-page="admin-dashboard"] .admin-btn-back:hover {

    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(234, 88, 12, 0.1));
    border-color: var(--orange-9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}



body[data-page="admin-dashboard"] .admin-btn-logout {

    background: linear-gradient(135deg, #FF3B30, #FF2D55);
    color: var(--text-primary);
    border: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}



body[data-page="admin-dashboard"] .admin-btn-logout:hover {

    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
    background: linear-gradient(135deg, #FF2D55, #FF3B30);
}



/* Theme-aware Action Buttons */

body[data-page="admin-dashboard"] .btn-filter {

    background: var(--glass-secondary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}



body[data-page="admin-dashboard"] .btn-filter:hover {

    background: var(--glass-hover);
    border-color: var(--orange-6);
}



body[data-page="admin-dashboard"] .btn-filter.active {

    background: linear-gradient(135deg, var(--orange-9), var(--orange-10));
    color: var(--text-primary);
    border-color: var(--orange-9);
}



/* Admin Header Responsive */
@media (max-width: 768px) {

    body[data-page="admin-dashboard"] .admin-header-container {

        padding: 16px 20px;
    }



    body[data-page="admin-dashboard"] .admin-header-content {

        gap: 24px;
    }



    body[data-page="admin-dashboard"] .admin-header-right {

        gap: 12px;
    }



    body[data-page="admin-dashboard"] .admin-header-title {

        font-size: 22px;
    }



    body[data-page="admin-dashboard"] .admin-email {

        display: none;
    }



    body[data-page="admin-dashboard"] .admin-header-btn {

        padding: 8px 16px;
        font-size: 14px;
    }


}


/* Mobile-first responsive design for admin dashboard */
body[data-page="admin-dashboard"] .rt-Button {

    min-height: 44px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 20px;
    letter-spacing: -0.01em;
}



body[data-page="admin-dashboard"] .rt-TextField-Input {

    min-height: 44px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 15px;
    padding: 10px 14px;
}



/* Enhanced glassmorphism for admin interface */
body[data-page="admin-dashboard"] .rt-Card[data-variant="glass"] {

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}



body[data-page="admin-dashboard"] .rt-Card[data-variant="glass"]:hover {

    transform: translateY(-2px);
    box-shadow: 0 16px 48px 0 rgba(31, 38, 135, 0.2);
    border-color: var(--orange-6);
}



/* Tab Navigation */
body[data-page="admin-dashboard"] .tab-btn {

    padding: 12px 24px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}



body[data-page="admin-dashboard"] .tab-btn:hover {

    background: var(--glass-hover);
    border-color: var(--ios-system-orange);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.15);
}



body[data-page="admin-dashboard"] .tab-active {

    background: linear-gradient(135deg, var(--orange-9), var(--orange-10));
    color: var(--text-primary) !important;
    font-weight: 600;
    border-color: var(--orange-9);
}



body[data-page="admin-dashboard"] .tab-active:hover {

    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
}



body[data-page="admin-dashboard"] .copy-btn {

    transition: all 0.3s ease;
}



body[data-page="admin-dashboard"] .copy-btn:active {

    transform: scale(0.95);
}



body[data-page="admin-dashboard"] .status-badge {

    animation: pulse 2s infinite;
}



@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Typography improvements */
body[data-page="admin-dashboard"] .rt-Heading {

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}



body[data-page="admin-dashboard"] .rt-Text {

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    letter-spacing: -0.01em;
}



/* Improved spacing for cards */
body[data-page="admin-dashboard"] .stat-card {

    padding: 24px;
}



body[data-page="admin-dashboard"] .content-card {

    padding: 32px;
}



/* Table improvements */
body[data-page="admin-dashboard"] table {

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}



body[data-page="admin-dashboard"] table th {

    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 16px;
}



body[data-page="admin-dashboard"] table td {

    font-size: 15px;
    padding: 16px;
    line-height: 1.5;
}



/* Tablet responsive adjustments */
@media (min-width: 768px) {

    body[data-page="admin-dashboard"] .rt-Button {

        min-height: 48px;
        font-size: 16px;
        padding: 12px 24px;
    }


}


/* Desktop responsive adjustments */
@media (min-width: 1024px) {

    body[data-page="admin-dashboard"] .rt-Button {

        min-height: 44px;
        font-size: 15px;
    }


}


/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {

    body[data-page="admin-dashboard"] .rt-Card[data-variant="glass"],
body[data-page="admin-dashboard"] .copy-btn,
body[data-page="admin-dashboard"] .status-badge {

        transition: none;
        transform: none !important;
        animation: none;
    }


}


/* Verification Code Cards */
body[data-page="admin-dashboard"] .code-card {

    background: var(--glass-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



body[data-page="admin-dashboard"] .code-card:hover {

    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.15);
    border-color: var(--orange-6);
}



body[data-page="admin-dashboard"] .code-card-header {

    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}



body[data-page="admin-dashboard"] .code-card-code {

    font-size: 26px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}



body[data-page="admin-dashboard"] .code-card-copy-btn {

    padding: 10px;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}



body[data-page="admin-dashboard"] .code-card-copy-btn:hover {

    background: var(--glass-hover);
    border-color: var(--orange-6);
    transform: scale(1.05);
}



body[data-page="admin-dashboard"] .code-card-copy-btn i {

    color: var(--text-secondary);
    font-size: 16px;
}



body[data-page="admin-dashboard"] .code-card-meta {

    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}



body[data-page="admin-dashboard"] .code-card-meta i {

    font-size: 12px;
}



body[data-page="admin-dashboard"] .code-card-notes {

    font-size: 13px;
    color: var(--text-secondary);
    padding: 12px;
    background: var(--glass-secondary);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: flex-start;
    gap: 6px;
}



body[data-page="admin-dashboard"] .code-card-notes i {

    font-size: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}



/* Codes Grid Container */
body[data-page="admin-dashboard"] .codes-grid-container {

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}



/* Code Filter Section */
body[data-page="admin-dashboard"] .code-filter-container {

    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 20px;
    flex-wrap: wrap;
}



body[data-page="admin-dashboard"] .code-filter-buttons {

    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}



body[data-page="admin-dashboard"] .code-filter-btn {

    padding: 10px 20px;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}



body[data-page="admin-dashboard"] .code-filter-btn:hover {

    background: var(--glass-hover);
    border-color: var(--orange-6);
    transform: translateY(-2px);
}



body[data-page="admin-dashboard"] .code-filter-btn.active {

    background: linear-gradient(135deg, var(--orange-9), var(--orange-10));
    color: var(--text-primary);
    border-color: var(--orange-9);
}



body[data-page="admin-dashboard"] .code-filter-btn .badge {

    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}



body[data-page="admin-dashboard"] .code-filter-btn:not(.active) .badge {

    background: var(--glass-border);
    color: var(--text-secondary);
}



/* Used Code Card Styling */
body[data-page="admin-dashboard"] .code-card.used {

    opacity: 0.7;
    background: var(--glass-secondary);
}



body[data-page="admin-dashboard"] .code-card.used .code-card-code {

    text-decoration: line-through;
    opacity: 0.6;
}



body[data-page="admin-dashboard"] .code-card.used::after {

    content: 'VERWENDET';
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--ios-system-red);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
}



body[data-page="admin-dashboard"] .code-card {

    position: relative;
}



body[data-page="admin-dashboard"] .code-card-delete-btn {

    margin-top: 8px;
    color: var(--ios-system-red);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
}



body[data-page="admin-dashboard"] .code-card-delete-btn:hover {

    color: #FF2D55;
    transform: translateX(4px);
}



body[data-page="admin-dashboard"] .code-card-delete-btn i {

    font-size: 13px;
}



/* Utility classes */
body[data-page="admin-dashboard"] .hidden {

    display: none !important;
}



body[data-page="admin-dashboard"] .container {

    max-width: 1200px;
    margin: 0 auto;
}



/* Horizontal Accordion Styles */
body[data-page="admin-dashboard"] .codes-accordion {

    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
    margin-bottom: 32px;
}



body[data-page="admin-dashboard"] .accordion-panel {

    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents grid blowout */
}



body[data-page="admin-dashboard"] .accordion-header {

    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px 12px 0 0;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    width: 100%;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}



body[data-page="admin-dashboard"] .accordion-header:hover {

    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(234, 88, 12, 0.1));
    border-color: var(--orange-6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}



body[data-page="admin-dashboard"] .accordion-header.active {

    background: linear-gradient(135deg, var(--orange-9), var(--orange-10));
    color: var(--text-primary);
    border-color: var(--orange-9);
}



body[data-page="admin-dashboard"] .accordion-header.active i {

    color: var(--text-primary) !important;
}



body[data-page="admin-dashboard"] .accordion-badge {

    background: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    margin-left: auto;
    margin-right: 12px;
}



body[data-page="admin-dashboard"] .accordion-header:not(.active) .accordion-badge {

    background: var(--gray-4);
    color: var(--gray-11);
}



body[data-page="admin-dashboard"] .accordion-icon {

    transition: transform 0.3s ease;
    font-size: 16px;
}



body[data-page="admin-dashboard"] .accordion-header.active .accordion-icon {

    transform: rotate(180deg);
}



body[data-page="admin-dashboard"] .accordion-content {

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}



body[data-page="admin-dashboard"] .accordion-content.active {

    max-height: 2000px;
}



/* Mobile Responsive for Accordion */
@media (max-width: 1024px) {

    body[data-page="admin-dashboard"] .codes-accordion {

        grid-template-columns: 1fr !important;
    }



    body[data-page="admin-dashboard"] .accordion-panel {

        margin-bottom: 16px;
    }


}

/* Role Switcher Styles (extracted from admin-dashboard.html inline styles) */
body[data-page="admin-dashboard"] .role-switch-btn:hover {
    background: var(--gray-3);
}

body[data-page="admin-dashboard"] #role-switcher-dropdown {
    transition: opacity 0.15s ease, transform 0.15s ease;
}

body[data-page="admin-dashboard"] #role-switcher-dropdown.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
}

body[data-page="admin-dashboard"] #role-switcher-dropdown:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}


/**
 * Admin Subscription Management - Modal Styles
 *
 * PURPOSE:
 * Styles for subscription assignment and additional users modals
 *
 * FOLLOWS:
 * - CSS cascade and hierarchy
 * - Theme responsiveness
 * - No inline styles
 */

/* Modal Overlay */
body[data-page="admin-subscriptions"] .admin-modal-overlay {

    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}



body[data-page="admin-subscriptions"] .admin-modal-overlay.active {

    display: flex;
}



/* Modal Content */
body[data-page="admin-subscriptions"] .admin-modal-content {

    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}



body[data-page="admin-subscriptions"] .admin-modal-content.large {

    max-width: 600px;
}



/* Modal Header */
body[data-page="admin-subscriptions"] .admin-modal-header {

    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--space-lg);
}



/* Modal User Info Box */
body[data-page="admin-subscriptions"] .admin-modal-user-info {

    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}



/* Modal Form */
body[data-page="admin-subscriptions"] .admin-modal-form {

    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}



body[data-page="admin-subscriptions"] .admin-modal-form-group {

    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}



body[data-page="admin-subscriptions"] .admin-modal-form-group label {

    display: block;
    font-weight: 600;
    color: var(--text-primary);
}



body[data-page="admin-subscriptions"] .admin-modal-form-group select {

    width: 100%;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: inherit;
}



body[data-page="admin-subscriptions"] .admin-modal-form-group select:focus {

    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}



/* Modal Actions */
body[data-page="admin-subscriptions"] .admin-modal-actions {

    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    margin-top: var(--space-lg);
}



/* Close Button (Round) */
body[data-page="admin-subscriptions"] .admin-modal-close-btn {

    padding: var(--space-xs);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* Additional Users List */
body[data-page="admin-subscriptions"] .admin-additional-users-list {

    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}



body[data-page="admin-subscriptions"] .admin-additional-users-list:empty::after {

    content: 'Keine zusätzlichen Benutzer';
    padding: var(--space-xl);
    text-align: center;
    color: var(--text-tertiary);
}



/* Inline Editable Cells */
body[data-page="admin-subscriptions"] .editable-cell {

    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
}



body[data-page="admin-subscriptions"] .editable-cell:hover {

    background: var(--glass-hover) !important;
}



body[data-page="admin-subscriptions"] .editable-cell:hover::after {

    content: '\270E';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.5;
    pointer-events: none;
}



body[data-page="admin-subscriptions"] .editable-cell.editing {

    background: var(--glass-secondary) !important;
}



body[data-page="admin-subscriptions"] .editable-cell select {

    width: 100%;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}



body[data-page="admin-subscriptions"] .editable-cell select:focus {

    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}



/* Number input for additional users */
body[data-page="admin-subscriptions"] .editable-cell input[type="number"] {

    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: text;
}



body[data-page="admin-subscriptions"] .editable-cell input[type="number"]:focus {

    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}



/* Remove spinner arrows on number input */
body[data-page="admin-subscriptions"] .editable-cell input[type="number"]::-webkit-inner-spin-button,
body[data-page="admin-subscriptions"] .editable-cell input[type="number"]::-webkit-outer-spin-button {

    opacity: 1;
}



/* Additional Users Count Cell */
body[data-page="admin-subscriptions"] .additional-users-cell {

    padding: 16px;
    text-align: center;
}



body[data-page="admin-subscriptions"] .additional-users-content {

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}



body[data-page="admin-subscriptions"] .additional-users-count {

    font-weight: 600;
    color: var(--text-primary);
}



body[data-page="admin-subscriptions"] .view-users-btn {

    padding: 4px 8px;
    font-size: 12px;
}



/* Inline Edit Input Specific Styles */
body[data-page="admin-subscriptions"] .inline-edit-input {

    width: 80px;
    text-align: center;
}



/* ============================================================================
   AUFGABEN (TASKS) STYLES - THREE-COLUMN LAYOUT
   ============================================================================

   This page uses a three-column layout:
   - Left sidebar (navigation, width: 17.5em)
   - Main content area (middle, flex: 1)
   - Right sidebar (tasks overview, width: 20em)

   Specificity strategy:
   - .page-aufgaben scoping (0,1,0) used for page-specific overrides
   - ID selectors (#mainContent, #task-modal) for high-specificity overrides
   - !important kept ONLY for: FullCalendar/Gantt third-party library overrides,
     and .hidden/.open toggle patterns where JS may race with CSS

   Theme compliance:
   - All colors use theme variables (--text-primary, --glass-primary, etc.)
   - #task-modal uses glass-card modal context (--_glass-card-bg)
   - #reopen-sidebar uses z-index token (--z-popover)
   - No hardcoded white/gray color values

   ============================================================================ */

/* Fixed background - doesn't shift with sidebar */
body.page-aufgaben {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Hide theme toggle button on this page */
body.page-aufgaben .theme-toggle-btn {
  display: none;
}

.app-header {
  background: transparent;
  border-bottom: none;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  max-width: 100%;
}

.header-content h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* App Container - Three-column layout */
body.page-aufgaben .app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Main Content - Force full height utilization */
/* Target the INNER .main-content inside .app-container */
body.page-aufgaben .app-container > .main-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: transparent;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-left: 0; /* Remove left margin - we're inside the layout already */
}

/* Main Content - Account for right sidebar width */
/* The right sidebar is 20em wide, so main content needs right margin + gap */
/* Override the global margin-left from sidebar.css (18.5em) - we use smaller padding */
/* SCOPED to .page-aufgaben to not affect other pages */
.page-aufgaben #mainContent.main-content {
  margin-left: 0.5rem; /* Small gap from left sidebar */
  margin-right: 21em; /* Account for right sidebar (20em) + gap (1em) */
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  transition: margin 0.3s ease;
}

/* Container should fill available width, not center with auto margins */
#mainContent.main-content > .container {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* When right sidebar is collapsed, remove the right margin so content expands */
/* SCOPED to .page-aufgaben to not affect other pages */
.page-aufgaben .sidebar-right.collapsed ~ #reopen-sidebar ~ #mainContent.main-content,
.page-aufgaben:has(.sidebar-right.collapsed) #mainContent.main-content {
  margin-right: 0.5rem; /* Just small gap, no sidebar space needed */
}

/* When sidebar is collapsed, use 30px left margin as requested */
/* Target only the OUTER .main-content (direct child of .app-layout) */
body.page-aufgaben .app-layout:has(.sidebar-collapsed) > .main-content {
  margin-left: 1.875em; /* 30px = 1.875em */
}

/* Position reopen button to not interfere with content */
body.page-aufgaben .app-layout:has(.sidebar-collapsed) .sidebar-reopen-btn {
  left: 0.5rem; /* Reduce from 1.25rem to save space */
  width: 3em; /* Slightly smaller button when collapsed */
  height: 3em;
}

/* View Controls - Force compact sizing */
body.page-aufgaben .view-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 1rem;
  padding: 1rem;
  flex-shrink: 0; /* Don't shrink controls */
}

.view-switcher {
  display: flex;
  gap: 0.75em; /* Increased from 0.5em for more breathing room */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.5em; /* Increased from 0.25em for more space */
  border-radius: 1.6875em; /* 27px = 1.6875em for responsive scaling */
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
  min-width: 28em; /* Increased from 17.5em (448px) for more space */
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.75em 1.5em; /* Increased from 0.5em 1.25em for larger buttons */
  border: none;
  background: transparent;
  border-radius: 1.6875em; /* 27px = 1.6875em for responsive scaling */
  cursor: pointer;
  font-size: 0.875em;
  font-weight: 500;
  line-height: 1;
  color: rgba(0, 0, 0, 0.7);
  transition: all 0.2s;
  min-width: 6.5em; /* Increased from 5.625em (104px) for wider buttons */
  white-space: nowrap; /* Prevent text wrapping */
  text-align: center;
}

.view-btn svg {
  flex-shrink: 0;
  display: block;
}

.view-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.view-btn.active {
  background: rgba(255, 255, 255, 0.25);
  color: rgba(0, 0, 0, 0.95);
  font-weight: 600;
  /* Orange gradient glow effect - like a lamp from behind */
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.4),
    0 0 1.25em rgba(255, 94, 58, 0.4),
    0 0 2.5em rgba(255, 179, 71, 0.2),
    0 0.125em 0.5em rgba(255, 94, 58, 0.3);
}

/* Neue Aufgabe Button - Match upload-btn from documents.css */
#new-task-btn {
  padding: 0.875em 1.75em; /* Increased from 0.75em 1.5em for more presence */
  background: linear-gradient(135deg, #ff5e3a 0%, #ff6b47 50%, #ffb347 100%);
  color: #ffffff;
  border: none;
  border-radius: 1.6875em; /* 27px responsive */
  font-family: 'Noto Sans', sans-serif;
  font-size: 1em;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.625em; /* Increased from 0.5em for better icon spacing */
  box-shadow: 0 4px 12px rgba(255, 94, 58, 0.4);
  transition: all 0.2s;
  white-space: nowrap; /* Prevent text wrapping */
  min-width: 10em; /* Ensure button has minimum width */
}

#new-task-btn svg {
  flex-shrink: 0;
  display: block;
}

#new-task-btn:hover {
  background: linear-gradient(135deg, #ff6b47 0%, #ff7a5c 50%, #ffc266 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 94, 58, 0.5);
}

/* Base Button Styles - btn-secondary (glass effect) */
.btn-secondary,
#filter-toggle,
#today-btn,
#calendar-settings-btn {
  background: var(--glass-primary, rgba(255, 255, 255, 0.12));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary, rgba(0, 0, 0, 0.9));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
  padding: 0.625em 1.25em;
  border-radius: 1.6875em;
  font-size: 0.875em;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-secondary svg,
#filter-toggle svg,
#today-btn svg,
#calendar-settings-btn svg {
  flex-shrink: 0;
  display: block;
}

.btn-secondary:hover,
#filter-toggle:hover,
#today-btn:hover,
#calendar-settings-btn:hover {
  background: var(--glass-hover, rgba(255, 255, 255, 0.2));
  border-color: var(--glass-border, rgba(255, 255, 255, 0.25));
  transform: translateY(-1px);
}

/* Base Button Styles - btn-primary (orange gradient) */
.btn-primary {
  background: linear-gradient(135deg, #ff5e3a 0%, #ff6b47 50%, #ffb347 100%);
  color: #ffffff;
  border: none;
  padding: 0.75em 1.5em;
  border-radius: 1.6875em;
  font-size: 0.875em;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5em;
  box-shadow: 0 4px 12px rgba(255, 94, 58, 0.4);
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary svg {
  flex-shrink: 0;
  display: block;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff6b47 0%, #ff7a5c 50%, #ffc266 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 94, 58, 0.5);
}

/* Filter Panel - Hidden by default, use .open to show */
.filter-panel {
  display: none; /* Hidden by default */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  grid-template-columns: repeat(auto-fit, minmax(14em, 1fr));
  gap: 1.5rem;
  transition: all 0.3s;
  flex-shrink: 0; /* Don't shrink when visible */
}

/* Show filter panel when .open class is added */
.filter-panel.open {
  display: grid;
}

/* Legacy support: .hidden class (deprecated - use .open instead) */
.filter-panel.hidden {
  display: none;
  margin: 0;
  padding: 0;
  height: 0; /* Collapse completely */
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-section-horizontal {
  grid-column: 1 / -1;
}

.filter-label,
.modal-body label,
.form-label {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-options-horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.8);
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Custom Checkbox Styling - Modern Glass Design */
.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:hover {
  border-color: rgba(255, 94, 58, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.checkbox-label input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #ff5e3a 0%, #ff6b47 50%, #ffb347 100%);
  border-color: #ff5e3a;
  box-shadow: 0 0 0 3px rgba(255, 94, 58, 0.2);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
}

.checkbox-label input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 94, 58, 0.3);
}

.date-range,
.progress-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-range input,
.progress-range input {
  flex: 0 1 auto;
  width: 5.5em;
  min-width: 5.5em;
  max-width: 5.5em;
}

.date-range span,
.progress-range span {
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.6);
  font-weight: 500;
  flex-shrink: 0;
}

/* Form Inputs - Modern Glass Style */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
textarea,
select,
.date-input,
.select-input,
.text-input,
.number-input {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.9);
  font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
  transition: all 0.2s;
  flex: 1;
  box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.08);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus,
.date-input:focus,
.select-input:focus,
.text-input:focus,
.number-input:focus {
  outline: none;
  border-color: #f97316;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder,
.text-input::placeholder,
.number-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

/* Date/Time input icons */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(0.9);
  opacity: 0.7;
  cursor: pointer;
}

/* Select dropdown arrow */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* Option elements in select */
select option {
  background: rgba(30, 30, 35, 0.95);
  color: var(--text-primary);
  padding: 0.5rem;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: var(--text-tertiary);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #f97316;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Form Labels */
label,
.modal label,
.modal-body label,
.form-group label {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

/* Ensure all text in modal uses theme colors */
.modal,
.modal-content,
.modal-body {
  color: var(--text-primary);
}

.modal h2,
.modal h3,
.modal h4 {
  color: var(--text-primary);
}

/* Helper/hint text below inputs */
.modal-body small,
.modal-body .help-text,
.modal-body .hint-text,
.form-help,
.form-hint {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

/* Ensure all paragraphs and spans use theme colors */
.modal-body p,
.modal-body span,
.modal-body div {
  color: var(--text-primary);
}

.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* View Containers */
.view-container {
  display: none; /* Hide by default */
  background: var(--glass-primary, rgba(255, 255, 255, 0.12));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 1rem;
  padding: 0;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.view-container.active {
  display: flex;
  flex-direction: column;
  flex: 1; /* Take all remaining space in main-content */
  min-height: 0; /* Allow flexbox to work properly */
  overflow: hidden; /* Prevent overflow from parent */
}

/* Ensure non-active views are hidden */
.view-container:not(.active) {
  display: none;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

/* Timeline/Gantt View - Only when active */
#timeline-view.active {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.timeline-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  padding: 1em;
  border-bottom: none;
  flex-shrink: 0; /* Don't shrink controls */
}

.zoom-controls {
  display: flex;
  gap: 0.25em;
  background: var(--glass-primary, rgba(255, 255, 255, 0.12));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.25em;
  border-radius: 1.6875em;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.zoom-controls button,
.zoom-controls .btn-icon {
  background: transparent;
  border: none;
  padding: 0.5em 1em;
  border-radius: 1.5em;
  font-size: 0.875em;
  font-weight: 500;
  color: var(--text-primary, rgba(0, 0, 0, 0.8));
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.zoom-controls button:hover,
.zoom-controls .btn-icon:hover {
  background: var(--glass-hover, rgba(255, 255, 255, 0.15));
}

.zoom-controls button.active,
.zoom-controls .btn-icon.active {
  background: var(--glass-secondary, rgba(255, 255, 255, 0.25));
  color: var(--text-primary, rgba(0, 0, 0, 0.95));
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Gantt Container */
#timeline-view .gantt-container,
.gantt-container {
  overflow-x: auto;
  overflow-y: auto;
  flex: 1; /* Take all available space in flex container */
  min-height: 0; /* Allow flexbox to shrink properly */
  height: 100%; /* Fill available parent space */
}

/* Gantt SVG - Force full height */
#gantt-container svg {
  min-height: 100%;
}

/* Calendar View - Only when active */
#calendar-view.active {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#calendar-container {
  flex: 1; /* Fill available space */
  min-height: 0; /* Allow flex to work */
}

/* FullCalendar Custom Styles - Match Timeline View */
/* Override FullCalendar's default button styles */
/* NOTE: !important is required below to override FullCalendar's bundled stylesheet */
.fc .fc-toolbar {
  padding: 1em !important;
  gap: 1em !important;
}

/* Left toolbar (prev, next, today buttons) */
.fc .fc-toolbar-chunk:first-child {
  display: flex !important;
  gap: 0.5em !important;
}

/* Center toolbar (title) */
.fc .fc-toolbar-chunk:nth-child(2) {
  font-size: 1.25em !important;
  font-weight: 600 !important;
  color: rgba(0, 0, 0, 0.9) !important;
}

/* Right toolbar (view buttons) - Match zoom-controls style */
.fc .fc-toolbar-chunk:last-child {
  display: flex !important;
  gap: 0.5em !important;
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  padding: 0.25em !important;
  border-radius: 1.6875em !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12) !important;
}

/* All FullCalendar buttons - Reset default styles */
.fc .fc-button {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  padding: 0.5em 1em !important;
  border-radius: 1.6875em !important;
  font-size: 0.875em !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  color: rgba(0, 0, 0, 0.7) !important;
  transition: all 0.2s !important;
}

/* Button hover state */
.fc .fc-button:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: rgba(0, 0, 0, 0.95) !important;
}

/* Active button state - Match timeline zoom-controls active style */
.fc .fc-button-active {
  background: rgba(255, 255, 255, 0.25) !important;
  color: rgba(0, 0, 0, 0.95) !important;
  font-weight: 600 !important;
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.4),
    0 0 1.25em rgba(255, 94, 58, 0.4),
    0 0 2.5em rgba(255, 179, 71, 0.2),
    0 0.125em 0.5em rgba(255, 94, 58, 0.3) !important;
}

/* Remove button group borders */
.fc .fc-button-group {
  border: none !important;
  box-shadow: none !important;
}

/* Prev/Next buttons - Match secondary button style */
.fc .fc-prev-button,
.fc .fc-next-button {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  padding: 0.625em 1em !important;
  box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12) !important;
}

.fc .fc-prev-button:hover,
.fc .fc-next-button:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Today button - Match timeline today button */
.fc .fc-today-button {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  padding: 0.625em 1.25em !important;
  box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12) !important;
}

.fc .fc-today-button:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Disabled button state */
.fc .fc-button:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

/* Calendar Grid Colors - Modern neutral palette */
.fc .fc-scrollgrid {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.fc .fc-daygrid-day,
.fc .fc-timegrid-slot,
.fc .fc-timegrid-col {
  background: rgba(255, 255, 255, 0.4) !important;
}

.fc .fc-col-header-cell {
  background: rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  font-weight: 600 !important;
  color: rgba(0, 0, 0, 0.8) !important;
}

/* Corner header cell (top-left, where time axis meets day headers) */
.fc .fc-timegrid-axis.fc-scrollgrid-shrink {
  background: rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.fc .fc-timegrid-slot {
  border-color: rgba(0, 0, 0, 0.05) !important;
}

.fc .fc-timegrid-slot-label {
  color: rgba(0, 0, 0, 0.6) !important;
  font-size: 0.85em !important;
}

/* Today highlighting - subtle */
.fc .fc-day-today {
  background: rgba(255, 94, 58, 0.05) !important;
}

.fc .fc-timegrid-col.fc-day-today {
  background: rgba(255, 94, 58, 0.03) !important;
}

/* All-day section */
.fc .fc-timegrid-divider {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Now indicator (current time line) */
.fc .fc-timegrid-now-indicator-line {
  border-color: #ff5e3a !important;
  border-width: 2px !important;
}

.fc .fc-timegrid-now-indicator-arrow {
  border-color: #ff5e3a !important;
}

/* List View - Only when active */
#list-view.active {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.task-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1em;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0; /* Don't shrink header */
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-controls label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1; /* Fill available space */
  overflow-y: auto; /* Scroll if needed */
  padding: 1em;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--glass-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.task-item:hover {
  background: var(--glass-hover);
  border-color: var(--accent-primary);
}

.task-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.task-details {
  flex: 1;
}

.task-title {
  font-weight: 400;
  color: rgba(30, 30, 35, 0.95);
  margin-bottom: 0.25rem;
  font-family: 'Noto Sans JP', sans-serif;
}

.task-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: rgba(60, 60, 70, 0.8);
  font-weight: 400;
  font-family: 'Noto Sans JP', sans-serif;
}

.priority-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.priority-critical { background: #fee2e2; color: #991b1b;
}
.priority-urgent { background: #fee2e2; color: #991b1b;
}
.priority-high { background: #fecaca; color: #b91c1c;
}
.priority-medium { background: #dbeafe; color: #1e40af;
}
.priority-low { background: #f3f4f6; color: #6b7280;
}

/* Empty state message */
.empty-state-message {
  padding: 1rem 1.5rem;
  color: rgba(60, 60, 70, 0.6);
  font-size: 0.875rem;
  text-align: center;
  font-family: 'Noto Sans JP', sans-serif;
}

/* Right Sidebar - Fixed position on the right */
.sidebar-right {
  position: fixed;
  top: 0;
  right: 0;
  width: 20em;
  height: 100vh;
  background: var(--glass-primary, rgba(255, 255, 255, 0.12));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar-right .sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
}

.sidebar-right .sidebar-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.sidebar-right .sidebar-section {
  margin-bottom: 0.5rem;
}

.sidebar-right .section-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: var(--glass-secondary, rgba(255, 255, 255, 0.08));
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
}

.sidebar-right .section-toggle:hover {
  background: var(--glass-hover, rgba(255, 255, 255, 0.15));
}

.sidebar-right .section-toggle .badge {
  margin-left: auto;
  background: var(--glass-secondary, rgba(255, 255, 255, 0.15));
  padding: 0.125rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.75rem;
}

.sidebar-right .section-content {
  padding: 0.5rem 0 0.5rem 1rem;
}

.sidebar-right.collapsed {
  width: 0;
  padding: 0;
  overflow: hidden;
  transform: translateX(100%);
}

/* Right Sidebar reopen button - Hidden under sidebar when open */
#reopen-sidebar {
  position: fixed;
  right: -60px; /* Hidden off-screen by default */
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #ff5e3a 0%, #ff6b47 50%, #ffb347 100%);
  border: none;
  border-radius: 8px 0 0 8px;
  padding: 1.5rem 0.75rem;
  cursor: pointer;
  z-index: var(--z-popover); /* Above sidebar z-index */
  box-shadow: -4px 0 12px rgba(255, 94, 58, 0.4);
  transition: right 0.3s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

#reopen-sidebar::before {
  content: 'AUFGABEN';
  display: block;
  margin-bottom: 0.75rem;
}

/* Show reopen button when sidebar is collapsed */
.sidebar-right.collapsed ~ #reopen-sidebar {
  right: 0; /* Slide in when sidebar is collapsed */
}

/* Force hide when .hidden class is present */
#reopen-sidebar.hidden {
  right: -60px;
  opacity: 0;
  pointer-events: none;
}

#reopen-sidebar:hover {
  background: linear-gradient(135deg, #ff6b47 0%, #ff7a5c 50%, #ffc266 100%);
  box-shadow: -6px 0 16px rgba(255, 94, 58, 0.6);
  right: 2px; /* Slide out slightly on hover */
}

#reopen-sidebar svg {
  width: 16px;
  height: 16px;
  margin-top: 0.5rem;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
}

/* Collapse button styling */
.sidebar-header #collapse-sidebar svg {
  width: 16px;
  height: 16px;
}

/* Glass effect for active/expanded sections */
.section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  transition: background 0.2s;
  font-size: 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
}

.section-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.section-toggle .chevron {
  transition: transform 0.2s;
}

.section-toggle:not(.active) .chevron {
  transform: rotate(-90deg);
}

.badge {
  margin-left: auto;
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  color: #fff;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.section-content {
  max-height: 400px;
  overflow-y: auto;
  transition: max-height 0.3s, padding 0.3s;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.section-content.hidden {
  max-height: 0;
  overflow: hidden;
  padding: 0;
}

.sidebar-task:last-child {
  border-bottom: none;
}

.sidebar-task-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(30, 30, 35, 0.95);
  margin-bottom: 0.25rem;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
}

.sidebar-task-meta {
  font-size: 0.75rem;
  color: rgba(60, 60, 70, 0.75);
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2);
  font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Buttons */

.btn-icon.active {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid transparent;
  background-image:
    linear-gradient(var(--background-primary), var(--background-primary)),
    linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* Modal - Use standard pattern: hidden by default, .open to show */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

/* Show modal when .open class is added */
.modal.open {
  display: flex;
}

/* Legacy support: .hidden class (deprecated - use .open instead) */
.modal.hidden {
  display: none;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

/* Empty State */
.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-secondary);
}

.empty-state svg {
  margin: 0 auto 1rem;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.875rem;
  margin: 0;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  opacity: 0.9;
  font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
}

/* Gantt Customization */
/* NOTE: !important is required below to override Frappe Gantt's bundled stylesheet */
#gantt-container .gantt,
.gantt {
  background: rgba(0, 0, 0, 0.25) !important; /* Dark glass base for whitish text visibility */
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  scroll-behavior: smooth !important;
  min-height: 100% !important; /* Force gantt to fill container */
  height: auto !important; /* Let it calculate height based on tasks */
}

.gantt .grid-background {
  fill: transparent !important;
}

.gantt .grid-row {
  fill: rgba(0, 0, 0, 0.15) !important; /* Darker rows for contrast */
}

.gantt .grid-row:nth-child(even) {
  fill: rgba(0, 0, 0, 0.05) !important; /* Subtle alternating rows */
}

/* Today marker - highly visible in all views */
.gantt .today-highlight {
  fill: rgba(249, 115, 22, 0.3) !important;
  stroke: #f97316 !important;
  stroke-width: 4 !important;
  opacity: 1 !important;
}

/* Today marker line animation */
@keyframes pulse-today {
  0%, 100% {
    opacity: 0.6;
    stroke-width: 4;
}
  50% {
    opacity: 1;
    stroke-width: 5;
}
}

.gantt .today-highlight.animate {
  animation: pulse-today 2s ease-in-out 3;
}

.gantt .bar {
  cursor: pointer;
  height: 40px !important;
  fill: #f97316 !important;
  rx: 8 !important;
  ry: 8 !important;
}

.gantt .bar-wrapper {
  height: 40px !important;
}

.gantt .bar-group .bar {
  fill: #f97316 !important;
}

.gantt .bar-group:hover .bar {
  fill: #ea580c !important;
}

.gantt .bar-progress {
  fill: #f97316 !important;
  opacity: 0.9;
  height: 40px !important;
}

.gantt .bar-wrapper:hover .bar-progress {
  fill: #ea580c !important;
  opacity: 1;
}

.gantt .bar-label {
  fill: #ffffff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  font-family: 'Noto Sans', 'Noto Sans KR', sans-serif !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Create gradient for default bar color */
.gantt svg defs {
  display: block;
}

.gantt .grid-header {
  fill: rgba(0, 0, 0, 0.2); /* Darker header for definition */
}

/* Event Color Coding */
.gantt .bar.color-red .bar-progress { fill: #ef4444;
}
.gantt .bar.color-orange .bar-progress { fill: #f97316;
}
.gantt .bar.color-yellow .bar-progress { fill: #eab308;
}
.gantt .bar.color-green .bar-progress { fill: #22c55e;
}
.gantt .bar.color-blue .bar-progress { fill: #3b82f6;
}
.gantt .bar.color-purple .bar-progress { fill: #a855f7;
}
.gantt .bar.color-pink .bar-progress { fill: #ec4899;
}
.gantt .bar.color-gray .bar-progress { fill: #6b7280;
}

/* FullCalendar Customization */
.fc-event {
  cursor: pointer;
  border: none !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  overflow: hidden !important;
}

.fc-event-title {
  font-weight: 500;
}

/* ============================================ */
/*       MONTH VIEW EVENT CONSTRAINTS          */
/* ============================================ */

/* Force events to fit within day cells in month view */
.fc-daygrid-event {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 0.75em !important;
  padding: 2px 4px !important;
  margin: 1px 2px !important;
  border-radius: 4px !important;
  max-width: 100% !important;
}

/* Event title truncation */
.fc-daygrid-event .fc-event-title {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  display: block !important;
}

/* Hide calendar name and location in month view - too much info */
.fc-daygrid-event .fc-event-calendar-name,
.fc-daygrid-event .fc-event-location {
  display: none !important;
}

/* Multi-day events - constrain to row height */
.fc-daygrid-event-harness {
  max-height: 20px !important;
  overflow: hidden !important;
}

/* Day cell event container - limit height and show overflow indicator */
.fc-daygrid-day-events {
  max-height: 80px !important;
  overflow: hidden !important;
}

/* Show "+more" link when events overflow */
.fc-daygrid-more-link {
  font-size: 0.7em !important;
  color: var(--text-secondary) !important;
  margin-top: 2px !important;
}

/* Day number positioning */
.fc-daygrid-day-top {
  flex-direction: row !important;
  padding: 4px !important;
}

.fc-daygrid-day-number {
  font-size: 0.85em !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}

/* ============================================ */
/*       WEEK/DAY VIEW EVENT STYLING           */
/* ============================================ */

/* In week/day views, show more info */
.fc-timegrid-event .fc-event-main-frame {
  padding: 4px 6px !important;
  overflow: hidden !important;
}

.fc-timegrid-event .fc-event-title {
  font-size: 0.8em !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Show calendar name in week/day views but smaller */
.fc-timegrid-event .fc-event-calendar-name {
  font-size: 0.65em !important;
  opacity: 0.8 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Hide location in time grid too - too cramped */
.fc-timegrid-event .fc-event-location {
  display: none !important;
}

/* ============================================ */
/*       LIST VIEW EVENT STYLING               */
/* ============================================ */

/* In list/year view, show full info */
.fc-list-event .fc-event-main-frame {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.fc-list-event .fc-event-title {
  font-weight: 500 !important;
}

.fc-list-event .fc-event-calendar-name,
.fc-list-event .fc-event-location {
  font-size: 0.75em !important;
  opacity: 0.7 !important;
}

/* ============================================ */
/*       PROGRESS BAR FOR TASKS                */
/* ============================================ */

.fc-event-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px !important;
  background: rgba(255, 255, 255, 0.4) !important;
  border-radius: 0 0 4px 4px;
}

/* Calendar Event Colors */
.fc-event.color-red { background: rgba(239, 68, 68, 0.8) !important;
}
.fc-event.color-orange { background: rgba(249, 115, 22, 0.8) !important;
}
.fc-event.color-yellow { background: rgba(234, 179, 8, 0.8) !important;
}
.fc-event.color-green { background: rgba(34, 197, 94, 0.8) !important;
}
.fc-event.color-blue { background: rgba(59, 130, 246, 0.8) !important;
}
.fc-event.color-purple { background: rgba(168, 85, 247, 0.8) !important;
}
.fc-event.color-pink { background: rgba(236, 72, 153, 0.8) !important;
}
.fc-event.color-gray { background: rgba(107, 114, 128, 0.8) !important;
}

/* Color Picker for Task Modal */
.color-picker {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.color-option {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  position: relative;
}

.color-option:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.color-option.selected {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.color-option.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 18px;
}

.color-option.color-red { background: #ef4444;
}
.color-option.color-orange { background: #f97316;
}
.color-option.color-yellow { background: #eab308;
}
.color-option.color-green { background: #22c55e;
}
.color-option.color-blue { background: #3b82f6;
}
.color-option.color-purple { background: #a855f7;
}
.color-option.color-pink { background: #ec4899;
}
.color-option.color-gray { background: #6b7280;
}

/* ============================================ */
/*       CALENDAR SYNC TOGGLE ROWS             */
/* ============================================ */

/* Container for calendar sync section */
.calendar-sync-section {
  margin-top: 1rem;
}

.calendar-sync-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.calendar-sync-header svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

/* Container for all calendar rows */
.calendar-rows-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Individual calendar row - compact design */
.calendar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  transition: background 0.2s;
}

.calendar-row:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Color dot indicator */
.calendar-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Calendar name text */
.calendar-row-name {
  flex: 1;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Provider label (e.g., iCloud) */
.calendar-row-provider {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  margin-left: auto;
  margin-right: 0.5rem;
}

/* iOS-style Toggle Switch */
.ios-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.ios-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ios-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ios-toggle-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: #ffffff;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Toggle ON state */
.ios-toggle input:checked + .ios-toggle-slider {
  background: linear-gradient(135deg, #ff5e3a 0%, #ff6b47 50%, #ffb347 100%);
  border-color: #ff5e3a;
}

.ios-toggle input:checked + .ios-toggle-slider::before {
  transform: translateX(18px);
}

/* Toggle focus state */
.ios-toggle input:focus + .ios-toggle-slider {
  box-shadow: 0 0 0 3px rgba(255, 94, 58, 0.3);
}

/* Toggle hover state */
.ios-toggle:hover .ios-toggle-slider {
  background: rgba(255, 255, 255, 0.2);
}

.ios-toggle:hover input:checked + .ios-toggle-slider {
  background: linear-gradient(135deg, #ff6b47 0%, #ff7a5c 50%, #ffc266 100%);
}

/* No calendars message */
.no-calendars-message {
  padding: 0.75rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  font-style: italic;
}

/* Selected state indicator - orange border */
.calendar-row.selected {
  background: rgba(255, 94, 58, 0.15);
  border: 1px solid rgba(255, 94, 58, 0.4);
}

/* Responsive - Tablet and below */
@media (max-width: 64em) { /* 1024px */
  .sidebar-right {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    z-index: 99;
    transform: translateX(100%);
    transition: transform 0.3s;
  }

  .sidebar-right.open {
    transform: translateX(0);
  }

  /* On tablet/mobile, main content doesn't need right margin since sidebar slides over */
  #mainContent.main-content {
    margin-right: 0;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }
}

/* Task Card Text - theme-aware */
.task-title {
  color: var(--text-primary);
}

.task-meta {
  color: var(--text-secondary);
}

/* Task Modal - glass-card modal context for proper theme backgrounds */
#task-modal {
  --_glass-card-bg: var(--glass-modal-bg);
  --_glass-card-blur: blur(40px);
  color: var(--text-primary);
}

/* All form labels in task modal */
#task-modal .form-label,
#task-modal label,
#task-modal .modal-body label {
  color: var(--text-primary);
}

/* All form inputs in task modal */
#task-modal .form-input,
#task-modal input,
#task-modal select,
#task-modal textarea {
  color: var(--text-primary);
}

/* All text elements in task modal */
#task-modal p,
#task-modal h1,
#task-modal h2,
#task-modal h3,
#task-modal h4,
#task-modal span,
#task-modal div {
  color: inherit;
}

/* Form hints */
#task-modal .form-hint,
#task-modal small.form-hint {
  color: var(--text-tertiary);
}

/* Title field - ensure full width */
#task-modal #task-title,
#task-modal #task-title.form-input,
#task-modal input#task-title {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ============================================ */
/*             DARK THEME OVERRIDES             */
/* ============================================ */

/* Dark theme - Force white text for all buttons and controls */
body[data-theme="dark"] .view-switcher button,
body[data-theme="dark"] .btn-secondary,
body[data-theme="dark"] .btn-icon,
body[data-theme="dark"] .zoom-controls button,
body[data-theme="dark"] button.btn-icon,
body.theme-dark .view-switcher button,
body.theme-dark .btn-secondary,
body.theme-dark .btn-icon,
body.theme-dark .zoom-controls button,
body.theme-dark button

/* Dark theme - Active button state */
body[data-theme="dark"] .btn-icon.active,
body[data-theme="dark"] .view-switcher button.active,
body.theme-dark .btn-icon.active,
body.theme-dark .view-switcher button.active {
  color: rgba(255, 255, 255, 1);
}

/* Dark theme - FullCalendar buttons */
body[data-theme="dark"] .fc .fc-button,
body[data-theme="dark"] .fc .fc-button-primary,
body.theme-dark .fc .fc-button,
body.theme-dark .fc .fc-button-primary {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Dark theme - FullCalendar grid cells (yearly/list view alternating rows) */
body[data-theme="dark"] .fc .fc-daygrid-day,
body[data-theme="dark"] .fc .fc-timegrid-slot,
body[data-theme="dark"] .fc .fc-timegrid-col,
body[data-theme="dark"] .fc .fc-daygrid-day-frame,
body[data-theme="dark"] .fc .fc-scrollgrid-sync-inner,
body[data-theme="darkart"] .fc .fc-daygrid-day,
body[data-theme="darkart"] .fc .fc-timegrid-slot,
body[data-theme="darkart"] .fc .fc-timegrid-col,
body[data-theme="darkart"] .fc .fc-daygrid-day-frame,
body[data-theme="darkart"] .fc .fc-scrollgrid-sync-inner,
body[data-theme="darkmodern"] .fc .fc-daygrid-day,
body[data-theme="darkmodern"] .fc .fc-timegrid-slot,
body[data-theme="darkmodern"] .fc .fc-timegrid-col,
body[data-theme="darkmodern"] .fc .fc-daygrid-day-frame,
body[data-theme="darkmodern"] .fc .fc-scrollgrid-sync-inner,
body.theme-dark .fc .fc-daygrid-day,
body.theme-dark .fc .fc-timegrid-slot,
body.theme-dark .fc .fc-timegrid-col,
body.theme-dark .fc .fc-daygrid-day-frame,
body.theme-dark .fc .fc-scrollgrid-sync-inner {
  background: rgba(0, 0, 0, 0.25) !important; /* Darker glass instead of white */
}

/* Dark theme - FullCalendar header cells */
body[data-theme="dark"] .fc .fc-col-header-cell,
body[data-theme="darkart"] .fc .fc-col-header-cell,
body[data-theme="darkmodern"] .fc .fc-col-header-cell,
body.theme-dark .fc .fc-col-header-cell {
  background: rgba(0, 0, 0, 0.35) !important; /* Darker header */
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Dark theme - Corner header cell (top-left, where time axis meets day headers) */
body[data-theme="dark"] .fc .fc-timegrid-axis.fc-scrollgrid-shrink,
body[data-theme="darkart"] .fc .fc-timegrid-axis.fc-scrollgrid-shrink,
body[data-theme="darkmodern"] .fc .fc-timegrid-axis.fc-scrollgrid-shrink,
body.theme-dark .fc .fc-timegrid-axis.fc-scrollgrid-shrink {
  background: rgba(0, 0, 0, 0.35) !important; /* Match header background */
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Dark theme - FullCalendar toolbar title (date header) */
body[data-theme="dark"] .fc .fc-toolbar-title,
body[data-theme="darkart"] .fc .fc-toolbar-title,
body[data-theme="darkmodern"] .fc .fc-toolbar-title,
body.theme-dark .fc .fc-toolbar-title {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Dark theme - FullCalendar time labels */
body[data-theme="dark"] .fc .fc-timegrid-slot-label,
body[data-theme="darkart"] .fc .fc-timegrid-slot-label,
body[data-theme="darkmodern"] .fc .fc-timegrid-slot-label,
body.theme-dark .fc .fc-timegrid-slot-label {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Dark theme - FullCalendar all-day label */
body[data-theme="dark"] .fc .fc-timegrid-axis-cushion,
body[data-theme="darkart"] .fc .fc-timegrid-axis-cushion,
body[data-theme="darkmodern"] .fc .fc-timegrid-axis-cushion,
body.theme-dark .fc .fc-timegrid-axis-cushion {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Dark theme - FullCalendar list/year view - Remove white alternating rows */
body[data-theme="dark"] .fc-theme-standard td,
body[data-theme="dark"] .fc-theme-standard th,
body[data-theme="dark"] .fc-list-day-cushion,
body[data-theme="dark"] .fc-list-table tbody tr,
body[data-theme="dark"] .fc-scrollgrid-section-body td,
body[data-theme="darkart"] .fc-theme-standard td,
body[data-theme="darkart"] .fc-theme-standard th,
body[data-theme="darkart"] .fc-list-day-cushion,
body[data-theme="darkart"] .fc-list-table tbody tr,
body[data-theme="darkart"] .fc-scrollgrid-section-body td,
body[data-theme="darkmodern"] .fc-theme-standard td,
body[data-theme="darkmodern"] .fc-theme-standard th,
body[data-theme="darkmodern"] .fc-list-day-cushion,
body[data-theme="darkmodern"] .fc-list-table tbody tr,
body[data-theme="darkmodern"] .fc-scrollgrid-section-body td,
body.theme-dark .fc-theme-standard td,
body.theme-dark .fc-theme-standard th,
body.theme-dark .fc-list-day-cushion,
body.theme-dark .fc-list-table tbody tr,
body.theme-dark .fc-scrollgrid-section-body td {
  background: rgba(0, 0, 0, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Dark theme - All text in controls */
body[data-theme="dark"] .app-header,
body[data-theme="dark"] .view-controls,
body[data-theme="dark"] .filter-controls,
body[data-theme="darkart"] .app-header,
body[data-theme="darkart"] .view-controls,
body[data-theme="darkart"] .filter-controls,
body[data-theme="darkmodern"] .app-header,
body[data-theme="darkmodern"] .view-controls,
body[data-theme="darkmodern"] .filter-controls,
body.theme-dark .app-header,
body.theme-dark .view-controls,
body.theme-dark .filter-controls {
  color: rgba(255, 255, 255, 0.95);
}

/* Dark theme - Filter panel labels and text */
body[data-theme="dark"] .filter-label,
body[data-theme="dark"] .checkbox-label,
body[data-theme="dark"] .filter-section label,
body.theme-dark .filter-label,
body.theme-dark .checkbox-label,
body.theme-dark .filter-section label {
  color: rgba(255, 255, 255, 0.9);
}

/* Dark theme - Form inputs text color */
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  color: rgba(255, 255, 255, 0.95);
}

/* Dark theme - Sidebar text */
body[data-theme="dark"] .sidebar-right,
body[data-theme="dark"] .sidebar-header h2,
body[data-theme="dark"] .sidebar-header h3,
body[data-theme="dark"] .section-title,
body.theme-dark .sidebar-right,
body.theme-dark .sidebar-header h2,
body.theme-dark .sidebar-header h3,
body.theme-dark .section-title {
  color: rgba(255, 255, 255, 0.95);
}

/* Dark theme - Task cards - Complete styling */
body[data-theme="dark"] .task-item,
body[data-theme="darkart"] .task-item,
body[data-theme="darkmodern"] .task-item,
body.theme-dark .task-item {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .task-item:hover,
body[data-theme="darkart"] .task-item:hover,
body[data-theme="darkmodern"] .task-item:hover,
body.theme-dark .task-item:hover {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .task-title,
body[data-theme="darkart"] .task-title,
body[data-theme="darkmodern"] .task-title,
body.theme-dark .task-title {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 400;
  font-family: 'Noto Sans JP', sans-serif;
}

body[data-theme="dark"] .task-meta,
body[data-theme="darkart"] .task-meta,
body[data-theme="darkmodern"] .task-meta,
body.theme-dark .task-meta {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  font-family: 'Noto Sans JP', sans-serif;
}

body[data-theme="dark"] .empty-state-message,
body[data-theme="darkart"] .empty-state-message,
body[data-theme="darkmodern"] .empty-state-message,
body.theme-dark .empty-state-message {
  color: rgba(255, 255, 255, 0.6);
}

/* Mobile */
@media (max-width: 48em) { /* 768px */
  .app-header {
    padding: 1rem;
}

  body.page-aufgaben .main-content {
    padding: 1rem;
}

  .view-controls {
    flex-direction: column;
    align-items: stretch;
}

  .view-switcher {
    justify-content: center;
}

  .header-content h1 {
    font-size: 1.25rem;
}
}

/**
 * Erfolgsrechnung (P&L) Styles
 */

body[data-page="erfolgsrechnung"] .erfolgsrechnung-container {

    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0;
}



/* Header */
body[data-page="erfolgsrechnung"] .erfolgsrechnung-header {

    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}



body[data-page="erfolgsrechnung"] .erfolgsrechnung-header h2 {

    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}



body[data-page="erfolgsrechnung"] .erfolgsrechnung-header h2 i {

    color: var(--ios-system-orange, #f97316);
}



/* Filters */
body[data-page="erfolgsrechnung"] .pl-filters {

    margin-bottom: 2rem;
    padding: 1.5rem !important;
}



/* Summary Cards */
body[data-page="erfolgsrechnung"] .pl-summary-cards {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}



body[data-page="erfolgsrechnung"] .summary-card {

    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem !important;
}



body[data-page="erfolgsrechnung"] .card-icon {

    width: 4rem;
    height: 4rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--text-primary);
    flex-shrink: 0;
}



body[data-page="erfolgsrechnung"] .income-card .card-icon {

    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}



body[data-page="erfolgsrechnung"] .expense-card .card-icon {

    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}



body[data-page="erfolgsrechnung"] .profit-card .card-icon {

    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}



body[data-page="erfolgsrechnung"] .loss-card .card-icon {

    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}



body[data-page="erfolgsrechnung"] .card-content {

    flex: 1;
}



body[data-page="erfolgsrechnung"] .card-label {

    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}



body[data-page="erfolgsrechnung"] .card-value {

    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}



body[data-page="erfolgsrechnung"] .card-value.income {

    color: #10b981;
}



body[data-page="erfolgsrechnung"] .card-value.expense {

    color: #ef4444;
}



body[data-page="erfolgsrechnung"] .card-value.profit {

    color: #667eea;
}



body[data-page="erfolgsrechnung"] .card-value.loss {

    color: #f59e0b;
}



body[data-page="erfolgsrechnung"] .card-subtitle {

    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}



/* Breakdown Section */
body[data-page="erfolgsrechnung"] .pl-breakdown {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}



body[data-page="erfolgsrechnung"] .pl-section {

    padding: 1.5rem !important;
}



body[data-page="erfolgsrechnung"] .pl-section h3 {

    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}



body[data-page="erfolgsrechnung"] .section-income {

    color: #10b981;
}



body[data-page="erfolgsrechnung"] .section-expense {

    color: #ef4444;
}



/* Category List */
body[data-page="erfolgsrechnung"] .category-list {

    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}



body[data-page="erfolgsrechnung"] .category-item {

    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(107, 114, 128, 0.05);
    border-radius: 8px;
    transition: all 0.2s ease;
}



body[data-page="erfolgsrechnung"] .category-item:hover {

    background: rgba(107, 114, 128, 0.1);
    transform: translateX(4px);
}



body[data-page="erfolgsrechnung"] .category-info {

    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}



body[data-page="erfolgsrechnung"] .category-name {

    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}



body[data-page="erfolgsrechnung"] .category-badge {

    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    background: var(--glass-primary);
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}



body[data-page="erfolgsrechnung"] .category-amount {

    font-size: 1.125rem;
    font-weight: 700;
}



body[data-page="erfolgsrechnung"] .category-amount.income {

    color: #10b981;
}



body[data-page="erfolgsrechnung"] .category-amount.expense {

    color: #ef4444;
}



body[data-page="erfolgsrechnung"] .category-total {

    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 2px solid rgba(107, 114, 128, 0.2);
    font-size: 1.125rem;
}



body[data-page="erfolgsrechnung"] .category-total .income {

    color: #10b981;
}



body[data-page="erfolgsrechnung"] .category-total .expense {

    color: #ef4444;
}



/* Events Section */
body[data-page="erfolgsrechnung"] .pl-events {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
}



body[data-page="erfolgsrechnung"] .events-list {

    max-height: 600px;
    overflow-y: auto;
}



body[data-page="erfolgsrechnung"] .events-table {

    width: 100%;
    border-collapse: collapse;
}



body[data-page="erfolgsrechnung"] .events-table thead {

    position: sticky;
    top: 0;
    background: var(--glass-secondary);
    z-index: 10;
}



body[data-page="erfolgsrechnung"] .events-table th {

    padding: 0.75rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--glass-border);
}



body[data-page="erfolgsrechnung"] .events-table th.text-right {

    text-align: right;
}



body[data-page="erfolgsrechnung"] .events-table tbody tr {

    border-bottom: 1px solid rgba(107, 114, 128, 0.1);
    transition: background 0.2s ease;
}



body[data-page="erfolgsrechnung"] .events-table tbody tr:hover {

    background: rgba(107, 114, 128, 0.05);
}



body[data-page="erfolgsrechnung"] .events-table td {

    padding: 0.875rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}



body[data-page="erfolgsrechnung"] .events-table td.text-right {

    text-align: right;
}



body[data-page="erfolgsrechnung"] .income-amount {

    font-weight: 700;
    color: #10b981;
}



body[data-page="erfolgsrechnung"] .expense-amount {

    font-weight: 700;
    color: #ef4444;
}



/* No Data State */
body[data-page="erfolgsrechnung"] .no-data {

    text-align: center;
    padding: 2rem;
    color: var(--text-tertiary);
    font-style: italic;
}



/* Responsive */
@media (max-width: 768px) {

    body[data-page="erfolgsrechnung"] .erfolgsrechnung-header {

        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }



    body[data-page="erfolgsrechnung"] .pl-summary-cards {

        grid-template-columns: 1fr;
    }



    body[data-page="erfolgsrechnung"] .pl-breakdown {

        grid-template-columns: 1fr;
    }



    body[data-page="erfolgsrechnung"] .pl-events {

        grid-template-columns: 1fr;
    }



    body[data-page="erfolgsrechnung"] .summary-card {

        flex-direction: column;
        text-align: center;
    }



    body[data-page="erfolgsrechnung"] .card-value {

        font-size: 1.5rem;
    }



    body[data-page="erfolgsrechnung"] .events-table {

        font-size: 0.75rem;
    }



    body[data-page="erfolgsrechnung"] .events-table th,
body[data-page="erfolgsrechnung"] .events-table td {

        padding: 0.5rem 0.25rem;
    }


}


/* Print Styles */
@media print {

    body[data-page="erfolgsrechnung"] .erfolgsrechnung-header button,
body[data-page="erfolgsrechnung"] .pl-filters {

        display: none;
    }



    body[data-page="erfolgsrechnung"] .pl-summary-cards,
body[data-page="erfolgsrechnung"] .pl-breakdown,
body[data-page="erfolgsrechnung"] .pl-events {

        break-inside: avoid;
    }



    body[data-page="erfolgsrechnung"] .events-list {

        max-height: none;
        overflow: visible;
    }


}


/**
 * Tools Pages CSS
 *
 * Purpose: Styling for cloud storage integration tools (Google Drive, OneDrive)
 * Dependencies: coeus-master.css (imported via master)
 * Theme-responsive: Uses CSS variables for all colors
 * Responsive: Uses em units, follows mobile-first approach
 *
 * Components:
 * - Tools hub layout
 * - Provider cards
 * - File browser (3-column layout)
 * - Folder tree
 * - File grid/list views
 * - File details sidebar
 * - Upload zone
 * - Sync history panel
 * - Modal dialogs
 */

/* ============================================================================
   Tools Page Layout
   ============================================================================ */

/* Consistent body font-size with other pages */
body[data-page="tools"] {

    font-size: calc(0.8125rem * var(--depth-scale, 1)); /* 13px at 16px base */
}




/* Tools page container - full width, proper padding */
body[data-page="tools"] #mainContent .container {

    max-width: 100% !important;
    width: 100% !important;
    padding-top: 2rem !important;
    padding-right: 2rem !important;
    padding-left: 1rem !important;
}



/* ============================================================================
   Tools Hub Layout
   ============================================================================ */

body[data-page="tools"] .tools-hub {

    /* Handled by utility classes in HTML */
}



/* ============================================================================
   Provider Cards
   ============================================================================ */

body[data-page="tools"] .provider-card {

    min-height: 20em;
    /* Hover effects handled in inline styles for simplicity */
}



/* ============================================================================
   File Browser Layout (3-column)
   ============================================================================ */

body[data-page="tools"] .file-browser {

    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}



body[data-page="tools"] .file-browser > .flex {

    flex: 1;
    min-height: 0; /* Critical for flexbox overflow */
}



/* ============================================================================
   Folder Tree (Left Sidebar)
   ============================================================================ */

body[data-page="tools"] .folder-tree {

    width: 15em;
    min-width: 12em;
    max-width: 20em;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}



body[data-page="tools"] .folder-tree > div:last-child {

    flex: 1;
    overflow-y: auto;
}



/* Folder tree items */
body[data-page="tools"] .folder-item {

    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.75em;
    border-radius: 0.5em;
    cursor: pointer;
    transition: background-color 0.15s ease;
}



body[data-page="tools"] .folder-item:hover {

    background: var(--glass-hover);
}



body[data-page="tools"] .folder-item.active {

    background: var(--glass-secondary);
    color: var(--ios-system-orange);
}



body[data-page="tools"] .folder-item.expandable::before {

    content: '▸';
    display: inline-block;
    width: 1em;
    transition: transform 0.15s ease;
}



body[data-page="tools"] .folder-item.expandable.expanded::before {

    transform: rotate(90deg);
}



body[data-page="tools"] .folder-children {

    padding-left: 1.25em;
    margin-top: 0.25em;
}



/* ============================================================================
   File Details (Right Sidebar)
   ============================================================================ */

body[data-page="tools"] .file-details {

    width: 18em;
    min-width: 15em;
    max-width: 25em;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}



body[data-page="tools"] .file-details > div:nth-child(2) {

    flex: 1;
    overflow-y: auto;
}



/* ============================================================================
   File Grid View
   ============================================================================ */

body[data-page="tools"] .file-grid {

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10em, 1fr));
    gap: 1em;
    width: 100%;
}



body[data-page="tools"] .file-item {

    display: flex;
    flex-direction: column;
    padding: 1em;
    border-radius: 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}



body[data-page="tools"] .file-item:hover {

    background: var(--glass-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}



body[data-page="tools"] .file-item.selected {

    background: var(--glass-secondary);
    border-color: #f97316;
}



body[data-page="tools"] .file-icon {

    width: 4em;
    height: 4em;
    margin: 0 auto 0.75em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5em;
    background: var(--glass-secondary);
}



body[data-page="tools"] .file-name {

    font-size: 0.875em;
    color: var(--text-primary);
    text-align: center;
    word-break: break-word;
    margin-bottom: 0.5em;
    line-height: 1.3;
}



body[data-page="tools"] .file-meta {

    font-size: 0.75em;
    color: var(--text-tertiary);
    text-align: center;
}



/* File action buttons (shown on hover) */
body[data-page="tools"] .file-actions {

    position: absolute;
    top: 0.5em;
    right: 0.5em;
    display: flex;
    gap: 0.25em;
    opacity: 0;
    transition: opacity 0.2s ease;
}



body[data-page="tools"] .file-item:hover .file-actions {

    opacity: 1;
}



body[data-page="tools"] .file-action-btn {

    width: 2em;
    height: 2em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.375em;
    cursor: pointer;
    transition: all 0.15s ease;
}



body[data-page="tools"] .file-action-btn:hover {

    background: var(--glass-hover);
    transform: scale(1.1);
}



body[data-page="tools"] .file-action-btn svg {

    width: 1em;
    height: 1em;
}



/* ============================================================================
   File List View
   ============================================================================ */

body[data-page="tools"] .file-list {

    display: flex;
    flex-direction: column;
    gap: 0.5em;
    width: 100%;
}



body[data-page="tools"] .file-list .file-item {

    flex-direction: row;
    align-items: center;
    padding: 0.75em 1em;
}



body[data-page="tools"] .file-list .file-icon {

    width: 2.5em;
    height: 2.5em;
    margin: 0 1em 0 0;
}



body[data-page="tools"] .file-list .file-name {

    flex: 1;
    text-align: left;
    margin-bottom: 0;
}



body[data-page="tools"] .file-list .file-meta {

    min-width: 8em;
    text-align: right;
    margin-right: 1em;
}



body[data-page="tools"] .file-list .file-actions {

    position: static;
    opacity: 1;
}



/* ============================================================================
   View Switcher
   ============================================================================ */

body[data-page="tools"] .view-switcher {

    min-width: 17.5em; /* Using em for responsiveness */
}



body[data-page="tools"] .view-switcher button {

    width: 2.5em;
    height: 2.5em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}



body[data-page="tools"] .view-switcher button.active {

    background: var(--glass-secondary);
    border-color: #f97316;
}



/* ============================================================================
   Upload Zone
   ============================================================================ */

body[data-page="tools"] .upload-zone {

    transition: all 0.2s ease;
    border: 2px dashed var(--glass-border);
    cursor: pointer;
}



body[data-page="tools"] .upload-zone:hover {

    background: var(--glass-hover);
    border-color: #f97316;
}



body[data-page="tools"] .upload-zone.drag-over {

    background: var(--glass-secondary);
    border-color: #f97316;
    border-style: solid;
}



/* ============================================================================
   Sync History Panel
   ============================================================================ */

body[data-page="tools"] .sync-history {

    height: 12em;
    overflow: hidden;
}



body[data-page="tools"] .sync-history-table {

    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}



body[data-page="tools"] .sync-history-table thead {

    background: var(--glass-secondary);
    position: sticky;
    top: 0;
    z-index: 1;
}



body[data-page="tools"] .sync-history-table th {

    padding: 0.75em 1em;
    text-align: left;
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="tools"] .sync-history-table td {

    padding: 0.75em 1em;
    font-size: 0.875em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="tools"] .sync-history-table tbody tr:hover {

    background: var(--glass-hover);
}



/* Sync status badges */
body[data-page="tools"] .sync-status {

    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.25em 0.75em;
    border-radius: 1em;
    font-size: 0.75em;
    font-weight: 500;
}



body[data-page="tools"] .sync-status.success {

    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}



body[data-page="tools"] .sync-status.error {

    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}



body[data-page="tools"] .sync-status.pending {

    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}



/* ============================================================================
   Modal Dialogs
   ============================================================================ */

body[data-page="tools"] .modal-backdrop {

    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1em;
}



body[data-page="tools"] .modal-content {

    max-width: 35em;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.2s ease;
}



@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-1em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body[data-page="tools"] .modal-header {

    padding-bottom: 1em;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1em;
}



body[data-page="tools"] .modal-footer {

    padding-top: 1em;
    border-top: 1px solid var(--glass-border);
    margin-top: 1em;
}



/* Progress bar in modal */
body[data-page="tools"] .progress-container {

    width: 100%;
    height: 0.5em;
    background: var(--glass-secondary);
    border-radius: 0.25em;
    overflow: hidden;
    margin: 1em 0;
}



body[data-page="tools"] .progress-bar {

    height: 100%;
    background: var(--ios-system-orange);
    transition: width 0.3s ease;
    border-radius: 0.25em;
}



/* ============================================================================
   Loading States
   ============================================================================ */

body[data-page="tools"] .spinner {

    width: 2.5em;
    height: 2.5em;
    border: 3px solid var(--glass-secondary);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}



@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton loading for file grid */
body[data-page="tools"] .skeleton-item {

    background: var(--glass-primary);
    border-radius: 0.75em;
    padding: 1em;
    animation: pulse 1.5s ease-in-out infinite;
}



@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

body[data-page="tools"] .skeleton-icon {

    width: 4em;
    height: 4em;
    margin: 0 auto 0.75em;
    background: var(--glass-secondary);
    border-radius: 0.5em;
}



body[data-page="tools"] .skeleton-text {

    height: 0.875em;
    background: var(--glass-secondary);
    border-radius: 0.25em;
    margin-bottom: 0.5em;
}



body[data-page="tools"] .skeleton-text:last-child {

    width: 60%;
    margin: 0 auto;
}



/* ============================================================================
   Toast Notifications
   ============================================================================ */

body[data-page="tools"] .toast {

    position: fixed;
    bottom: 2em;
    right: 2em;
    min-width: 18em;
    max-width: 25em;
    padding: 1em 1.25em;
    background: var(--glass-primary);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    animation: toastSlideIn 0.3s ease;
}



@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

body[data-page="tools"] .toast.success {

    border-left: 4px solid var(--ios-system-green);
}



body[data-page="tools"] .toast.error {

    border-left: 4px solid var(--ios-system-red);
}



body[data-page="tools"] .toast.info {

    border-left: 4px solid var(--ios-system-orange);
}



/* ============================================================================
   Responsive Design
   ============================================================================ */

/* Tablet (48em - 64em) */
@media (max-width: 64em) {

    body[data-page="tools"] .folder-tree {

        width: 12em;
        min-width: 10em;
    }



    body[data-page="tools"] .file-details {

        width: 15em;
        min-width: 12em;
    }



    body[data-page="tools"] .file-grid {

        grid-template-columns: repeat(auto-fill, minmax(8em, 1fr));
        gap: 0.75em;
    }


}


/* Mobile (< 48em) */
@media (max-width: 48em) {

    /* Hide sidebars on mobile, show as drawers */
    body[data-page="tools"] .folder-tree,
body[data-page="tools"] .file-details {

        position: fixed;
        top: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }



    body[data-page="tools"] .folder-tree {

        left: 0;
    }



    body[data-page="tools"] .file-details {

        right: 0;
        transform: translateX(100%);
    }



    body[data-page="tools"] .folder-tree.open {

        transform: translateX(0);
    }



    body[data-page="tools"] .file-details.open {

        transform: translateX(0);
    }



    /* Single column file grid on mobile */
    body[data-page="tools"] .file-grid {

        grid-template-columns: 1fr;
    }



    /* Force list view on mobile */
    body[data-page="tools"] .file-list {

        display: flex;
    }



    body[data-page="tools"] .file-grid.mobile-list {

        display: none;
    }



    /* Adjust sync history */
    body[data-page="tools"] .sync-history {

        height: auto;
        max-height: 15em;
    }



    /* Stack view switcher vertically if needed */
    body[data-page="tools"] .view-switcher {

        min-width: auto;
    }



    /* Adjust toast position */
    body[data-page="tools"] .toast {

        bottom: 1em;
        right: 1em;
        left: 1em;
        min-width: auto;
    }


}


/* ============================================================================
   Utility Classes (specific to tools)
   ============================================================================ */

body[data-page="tools"] .border-glass-border {

    border-color: var(--glass-border);
}



body[data-page="tools"] .hidden {

    display: none;
}



/* Ensure proper overflow handling */
body[data-page="tools"] .overflow-hidden {

    overflow: hidden;
}



body[data-page="tools"] .overflow-auto {

    overflow: auto;
}



body[data-page="tools"] .overflow-y-auto {

    overflow-y: auto;
}



body[data-page="tools"] .overflow-x-auto {

    overflow-x: auto;
}



/* ============================================================================
   Invoice Manager Styles (Rechnungen)
   ============================================================================ */

/* Invoice table container */
body[data-page="tools"] .invoices-table-container {

    overflow-x: auto;
    border-radius: 0.75em;
}



/* Invoice table */
body[data-page="tools"] .invoices-table {

    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}



body[data-page="tools"] .invoices-table thead {

    background: var(--glass-secondary);
    position: sticky;
    top: 0;
    z-index: 1;
}



body[data-page="tools"] .invoices-table th {

    padding: 0.75em 1em;
    text-align: left;
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}



body[data-page="tools"] .invoices-table th.sortable {

    cursor: pointer;
    transition: background 0.15s ease;
}



body[data-page="tools"] .invoices-table th.sortable:hover {

    background: var(--glass-hover);
}



body[data-page="tools"] .invoices-table th.sortable::after {

    content: '↕';
    opacity: 0.4;
    margin-left: 0.5em;
    font-size: 0.8em;
}



body[data-page="tools"] .invoices-table td {

    padding: 0.75em 1em;
    font-size: 0.875em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}



body[data-page="tools"] .invoices-table tbody tr {

    transition: background 0.15s ease;
}



body[data-page="tools"] .invoices-table tbody tr:hover {

    background: var(--glass-hover);
}



/* ============================================================================
   Template Category Filter Buttons
   ============================================================================ */

body[data-page="tools"] .template-category-btn {

    transition: all 0.2s ease;
    border: 1px solid transparent;
}



body[data-page="tools"] .template-category-btn.active {

    background: var(--glass-secondary);
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 1px var(--ios-system-orange);
}



body[data-page="tools"] .template-category-btn:hover:not(.active) {

    background: var(--glass-hover);
}



/* ============================================================================
   Invoice Management Styles
   ============================================================================ */

/* Invoice type badges (Eingang/Ausgang) */
body[data-page="tools"] .invoice-type-badge {

    display: inline-flex;
    align-items: center;
    padding: 0.25em 0.75em;
    border-radius: 1em;
    font-size: 0.75em;
    font-weight: 500;
    white-space: nowrap;
}



body[data-page="tools"] .invoice-type-incoming {

    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}



body[data-page="tools"] .invoice-type-outgoing {

    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}



/* Format badges (ZUGFeRD, XRechnung, PDF) */
body[data-page="tools"] .format-badge {

    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.25em 0.625em;
    border-radius: 0.375em;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}



body[data-page="tools"] .format-zugferd {

    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}



body[data-page="tools"] .format-xrechnung {

    background: linear-gradient(135deg, rgba(90, 200, 250, 0.2), rgba(6, 182, 212, 0.2));
    color: var(--ios-system-teal, #5AC8FA);
    border: 1px solid rgba(90, 200, 250, 0.3);
}



body[data-page="tools"] .format-pdf {

    background: rgba(100, 116, 139, 0.15);
    color: var(--text-tertiary);
    border: 1px solid var(--glass-border);
}



/* Status badges */
body[data-page="tools"] .status-badge {

    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.25em 0.75em;
    border-radius: 1em;
    font-size: 0.75em;
    font-weight: 500;
    white-space: nowrap;
}



body[data-page="tools"] .status-offen {

    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}



body[data-page="tools"] .status-bezahlt {

    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}



body[data-page="tools"] .status-ueberfaellig {

    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}



body[data-page="tools"] .status-storniert {

    background: rgba(100, 116, 139, 0.15);
    color: var(--text-tertiary);
}



/* Invoice summary cards */
body[data-page="tools"] .invoice-summary-cards {

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em;
}



body[data-page="tools"] .invoice-summary-card {

    display: flex;
    flex-direction: column;
    gap: 0.5em;
}



body[data-page="tools"] .invoice-summary-card .label {

    font-size: 0.75em;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}



body[data-page="tools"] .invoice-summary-card .value {

    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-primary);
}



body[data-page="tools"] .invoice-summary-card .value.negative {

    color: var(--ios-system-red);
}



body[data-page="tools"] .invoice-summary-card .value.positive {

    color: var(--ios-system-green);
}



/* Invoice upload zone */
body[data-page="tools"] .invoice-upload-zone {

    border: 2px dashed var(--glass-border);
    transition: all 0.2s ease;
}



body[data-page="tools"] .invoice-upload-zone:hover {

    border-color: var(--ios-system-orange);
    background: var(--glass-hover);
}



body[data-page="tools"] .invoice-upload-zone.drag-over {

    border-color: var(--ios-system-orange);
    border-style: solid;
    background: var(--glass-secondary);
}



/* Hover-lift effect for template cards */
body[data-page="tools"] .hover-lift {

    transition: all 0.2s ease;
}



body[data-page="tools"] .hover-lift:hover {

    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}



/* Invoice filter bar */
body[data-page="tools"] .invoice-filter-bar {

    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    align-items: center;
}



body[data-page="tools"] .invoice-filter-bar select,
body[data-page="tools"] .invoice-filter-bar input {

    min-width: 10em;
    padding: 0.5em 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-size: 0.875em;
}



body[data-page="tools"] .invoice-filter-bar select:focus,
body[data-page="tools"] .invoice-filter-bar input:focus {

    outline: none;
    border-color: var(--ios-system-orange);
}



/* Invoice action buttons in header */
body[data-page="tools"] .invoice-actions {

    display: flex;
    gap: 0.5em;
}



/* Responsive adjustments for invoice section */
@media (max-width: 64em) {

    body[data-page="tools"] .invoice-summary-cards {

        grid-template-columns: repeat(2, 1fr);
    }


}


@media (max-width: 48em) {

    body[data-page="tools"] .invoice-summary-cards {

        grid-template-columns: 1fr;
    }



    body[data-page="tools"] .invoice-filter-bar {

        flex-direction: column;
        align-items: stretch;
    }



    body[data-page="tools"] .invoice-filter-bar select,
body[data-page="tools"] .invoice-filter-bar input {

        width: 100%;
    }



    body[data-page="tools"] .invoices-table {

        font-size: 0.8em;
    }



    body[data-page="tools"] .invoices-table th,
body[data-page="tools"] .invoices-table td {

        padding: 0.5em;
    }


}


/* ============================================ */
/*          INVENTORY TOOL STYLES               */
/* ============================================ */

/* Inventory filter bar */
body[data-page="tools"] .inventory-filter-bar {

    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    align-items: center;
}



body[data-page="tools"] .inventory-filter-bar select,
body[data-page="tools"] .inventory-filter-bar input {

    min-width: 10em;
    padding: 0.5em 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-size: 0.875em;
}



body[data-page="tools"] .inventory-filter-bar select:focus,
body[data-page="tools"] .inventory-filter-bar input:focus {

    outline: none;
    border-color: var(--ios-system-orange);
}



/* Inventory modal form inputs - consistent styling */
body[data-page="tools"] #inventoryModal input,
body[data-page="tools"] #inventoryModal select,
body[data-page="tools"] #inventoryModal textarea {

    color: var(--text-primary);
    background: var(--glass-secondary);
}



body[data-page="tools"] #inventoryModal input::placeholder,
body[data-page="tools"] #inventoryModal textarea::placeholder {

    color: var(--text-tertiary);
}



/* Fix for date, number, and select inputs */
body[data-page="tools"] #inventoryModal input[type="date"],
body[data-page="tools"] #inventoryModal input[type="number"],
body[data-page="tools"] #inventoryModal input[type="text"],
body[data-page="tools"] #inventoryModal select {

    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
}



/* Select option styling */
body[data-page="tools"] #inventoryModal select option {

    background: var(--glass-primary);
    color: var(--text-primary);
}



/* Date input calendar icon color fix for dark themes */
body[data-page="tools"] #inventoryModal input[type="date"]::-webkit-calendar-picker-indicator {

    filter: invert(0.8);
}



body[data-page="tools"] [data-theme="light"] #inventoryModal input[type="date"]::-webkit-calendar-picker-indicator,
body[data-page="tools"] [data-theme="lightmodern"] #inventoryModal input[type="date"]::-webkit-calendar-picker-indicator {

    filter: none;
}



/* Inventory statistics cards */
body[data-page="tools"] .inventory-stat-card {

    text-align: center;
}



body[data-page="tools"] .inventory-stat-card .stat-value {

    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-primary);
}



body[data-page="tools"] .inventory-stat-card .stat-label {

    font-size: 0.875em;
    color: var(--text-secondary);
}



/* Inventory table */
body[data-page="tools"] .inventory-table {

    width: 100%;
    border-collapse: collapse;
}



body[data-page="tools"] .inventory-table th,
body[data-page="tools"] .inventory-table td {

    padding: 0.75em;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="tools"] .inventory-table th {

    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875em;
}



body[data-page="tools"] .inventory-table td {

    color: var(--text-primary);
}



body[data-page="tools"] .inventory-table tbody tr:hover {

    background: var(--glass-hover);
}



/* Responsive adjustments for inventory */
@media (max-width: 48em) {

    body[data-page="tools"] .inventory-filter-bar {

        flex-direction: column;
        align-items: stretch;
    }



    body[data-page="tools"] .inventory-filter-bar select,
body[data-page="tools"] .inventory-filter-bar input {

        width: 100%;
    }


}


/* ============================================================================
   Disabled Tab Styles
   ============================================================================ */

/* Disabled tab button */
body[data-page="tools"] .tab-button.tab-disabled {

    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}



body[data-page="tools"] .tab-button.tab-disabled:hover {

    background: transparent;
    color: var(--text-secondary);
}



/* Coming soon badge */
body[data-page="tools"] .coming-soon-badge {

    position: absolute;
    top: -0.25em;
    right: -0.25em;
    background: var(--ios-system-orange);
    color: var(--text-primary);
    font-size: 0.6em;
    font-weight: 600;
    padding: 0.2em 0.5em;
    border-radius: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
}



/* ============================================================================
   Inventory Modal Fix
   Override liegenschaften.css opacity:0 default for modal-overlay
   The inventory modal uses hidden class toggle, not open class
   ============================================================================ */

body[data-page="tools"] #inventoryModal.modal-overlay {

    opacity: 1;
    visibility: visible;
}



body[data-page="tools"] #inventoryModal.modal-overlay.hidden {

    display: none;
    opacity: 0;
    visibility: hidden;
}



/* ============================================================================
   Inventory Modal - Professional Redesign
   ============================================================================ */

/* Modal Content Container - More Padding & Max Width */
body[data-page="tools"] #inventoryModal .modal-content {
    max-width: 56em;
    padding: 2em 2.5em 2.5em;
    border-radius: 1.25em;
    background: var(--glass-card-bg, var(--glass-primary));
    border: 1px solid var(--glass-border);
}

/* Modal Header - More Breathing Room */
body[data-page="tools"] #inventoryModal .modal-content > .flex-between:first-child {
    margin-bottom: 2em;
    padding-bottom: 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="tools"] #inventoryModal .modal-content > .flex-between:first-child h2 {
    font-size: 1.5em;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Form Sections - Increased Spacing */
body[data-page="tools"] #inventoryModal form > .mb-lg {
    margin-bottom: 2.5em;
    padding-bottom: 2em;
    border-bottom: 1px solid var(--glass-border);
}

/* Remove border from last section before buttons */
body[data-page="tools"] #inventoryModal form > .mb-lg:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 2em;
}

/* Section Titles - Better Typography & Spacing */
body[data-page="tools"] #inventoryModal .ios-headline {
    font-size: 1.125em;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 1.25em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

/* Add subtle icon indicator before section titles */
body[data-page="tools"] #inventoryModal .ios-headline::before {
    content: '';
    width: 3px;
    height: 1.1em;
    background: var(--ios-system-orange, #FF9500);
    border-radius: 2px;
}

/* Grid Layout - More Gap Between Fields */
body[data-page="tools"] #inventoryModal .grid {
    gap: 1.25em 1.5em;
}

/* Form Field Groups - Better Spacing */
body[data-page="tools"] #inventoryModal .flex.flex-col.gap-xs {
    gap: 0.5em;
}

/* Form Labels - Better Typography */
body[data-page="tools"] #inventoryModal .form-label {
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

/* Form Inputs - Refined Styling */
body[data-page="tools"] #inventoryModal input,
body[data-page="tools"] #inventoryModal select,
body[data-page="tools"] #inventoryModal textarea {
    padding: 0.75em 1em;
    font-size: 0.9375em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.625em;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body[data-page="tools"] #inventoryModal input:focus,
body[data-page="tools"] #inventoryModal select:focus,
body[data-page="tools"] #inventoryModal textarea:focus,
body[data-page="tools"] #inventoryModal input:focus-visible,
body[data-page="tools"] #inventoryModal select:focus-visible,
body[data-page="tools"] #inventoryModal textarea:focus-visible {
    outline: none !important;
    border-color: var(--ios-system-orange, #FF9500) !important;
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.2) !important;
}

/* Placeholder Styling */
body[data-page="tools"] #inventoryModal input::placeholder,
body[data-page="tools"] #inventoryModal textarea::placeholder {
    color: var(--text-tertiary);
    opacity: 0.8;
}

/* Textarea - Better Height */
body[data-page="tools"] #inventoryModal textarea {
    min-height: 5em;
    resize: vertical;
}

/* Select Dropdown Styling */
body[data-page="tools"] #inventoryModal select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%23888'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75em center;
    padding-right: 2.5em;
}

/* Optgroup Styling for Depreciation Method */
body[data-page="tools"] #inventoryModal select optgroup {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-primary);
    background: var(--glass-secondary);
    padding: 0.5em 0;
}

body[data-page="tools"] #inventoryModal select optgroup option {
    font-weight: 400;
    padding-left: 1em;
    color: var(--text-secondary);
    background: var(--glass-primary);
}

/* Dropzone Areas - Better Styling */
body[data-page="tools"] #inventoryModal #inventoryImageDropzone,
body[data-page="tools"] #inventoryModal #receiptDropzone {
    padding: 2em;
    border-radius: 0.75em;
    border: 2px dashed var(--glass-border);
    background: var(--glass-primary);
    transition: all 0.2s ease;
}

body[data-page="tools"] #inventoryModal #inventoryImageDropzone:hover,
body[data-page="tools"] #inventoryModal #receiptDropzone:hover {
    border-color: var(--ios-system-orange, #FF9500);
    background: var(--glass-hover);
}

body[data-page="tools"] #inventoryModal #inventoryImageDropzone svg,
body[data-page="tools"] #inventoryModal #receiptDropzone svg {
    width: 2.5em;
    height: 2.5em;
    margin-bottom: 0.75em;
    color: var(--text-tertiary);
}

/* Helper Text Below Fields */
body[data-page="tools"] #inventoryModal .caption {
    font-size: 0.75em;
    color: var(--text-tertiary);
    margin-top: 0.375em;
}

/* Combined Input + Select Fields (Price, Duration, Interval) */
body[data-page="tools"] #inventoryModal .flex.gap-2 {
    gap: 0.5em;
}

/* Time Unit Selects - Fixed Width */
body[data-page="tools"] #inventoryModal select.w-28,
body[data-page="tools"] #inventoryModal #inventoryPeriodicityUnit,
body[data-page="tools"] #inventoryModal #inventoryDepreciationUnit,
body[data-page="tools"] #inventoryModal #inventoryCurrency {
    width: 7em;
    min-width: 7em;
    flex-shrink: 0;
    text-align: center;
}

/* Form Actions - Better Spacing */
body[data-page="tools"] #inventoryModal .flex.gap-sm.justify-end {
    gap: 1em;
    margin-top: 0.5em;
    padding-top: 1.5em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="tools"] #inventoryModal .flex.gap-sm.justify-end button {
    padding: 0.75em 1.5em;
    font-size: 0.9375em;
    font-weight: 500;
    border-radius: 0.625em;
    transition: all 0.2s ease;
}

body[data-page="tools"] #inventoryModal .flex.gap-sm.justify-end button[type="submit"] {
    background: var(--ios-system-orange, #FF9500);
    color: var(--button-text-on-color);
    border: none;
}

body[data-page="tools"] #inventoryModal .flex.gap-sm.justify-end button[type="submit"]:hover {
    background: #e68600;
    transform: translateY(-1px);
}

/* ============================================================================
   Inventory Modal - Theme-Specific Overrides
   Ensures proper colors on all 5 themes: light, dark, colors, lightmodern, sunset
   ============================================================================ */

/* Light Theme */
[data-theme="light"] body[data-page="tools"] #inventoryModal .modal-content {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] body[data-page="tools"] #inventoryModal input,
[data-theme="light"] body[data-page="tools"] #inventoryModal select,
[data-theme="light"] body[data-page="tools"] #inventoryModal textarea {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
}

[data-theme="light"] body[data-page="tools"] #inventoryModal .form-label {
    color: #4a4a4a;
}

[data-theme="light"] body[data-page="tools"] #inventoryModal input::placeholder,
[data-theme="light"] body[data-page="tools"] #inventoryModal textarea::placeholder {
    color: #888;
}

/* Dark Theme */
[data-theme="dark"] body[data-page="tools"] #inventoryModal .modal-content {
    background: rgba(28, 28, 32, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] body[data-page="tools"] #inventoryModal input,
[data-theme="dark"] body[data-page="tools"] #inventoryModal select,
[data-theme="dark"] body[data-page="tools"] #inventoryModal textarea {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f0f0f0;
}

[data-theme="dark"] body[data-page="tools"] #inventoryModal .form-label {
    color: #a0a0a0;
}

[data-theme="dark"] body[data-page="tools"] #inventoryModal input::placeholder,
[data-theme="dark"] body[data-page="tools"] #inventoryModal textarea::placeholder {
    color: #666;
}

[data-theme="dark"] body[data-page="tools"] #inventoryModal select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%23aaa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

/* LightModern Theme */
[data-theme="lightmodern"] body[data-page="tools"] #inventoryModal .modal-content {
    background: rgba(250, 250, 252, 0.96);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

[data-theme="lightmodern"] body[data-page="tools"] #inventoryModal input,
[data-theme="lightmodern"] body[data-page="tools"] #inventoryModal select,
[data-theme="lightmodern"] body[data-page="tools"] #inventoryModal textarea {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

[data-theme="lightmodern"] body[data-page="tools"] #inventoryModal .form-label {
    color: #555;
}

/* ============================================================================
   Inventory Modal - Responsive Adjustments
   ============================================================================ */

@media (max-width: 64em) {
    body[data-page="tools"] #inventoryModal .modal-content {
        max-width: 48em;
        padding: 1.75em 2em 2em;
    }

    body[data-page="tools"] #inventoryModal .grid.grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 48em) {
    body[data-page="tools"] #inventoryModal .modal-content {
        padding: 1.5em;
        margin: 1em;
        max-height: calc(100vh - 2em);
    }

    body[data-page="tools"] #inventoryModal .grid.grid-cols-2,
    body[data-page="tools"] #inventoryModal .grid.grid-cols-3 {
        grid-template-columns: 1fr;
    }

    body[data-page="tools"] #inventoryModal form > .mb-lg {
        margin-bottom: 1.75em;
        padding-bottom: 1.5em;
    }

    body[data-page="tools"] #inventoryModal .ios-headline {
        font-size: 1em;
    }
}


/* ========================================
   AUTO-DEPRECIATION TOGGLE STYLES
   ======================================== */

/* Auto-depreciation toggle button - shared between tools and finanzen */
body[data-page="tools"] .auto-depreciation-toggle {
    position: relative;
    width: 2.5rem;
    height: 1.375rem;
    background: var(--glass-secondary, rgba(128, 128, 128, 0.3));
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
}

body[data-page="tools"] .auto-depreciation-toggle .toggle-indicator {
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1.125rem;
    height: 1.125rem;
    background: var(--text-tertiary);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

body[data-page="tools"] .auto-depreciation-toggle.active {
    background: var(--ios-system-green, #34C759);
}

body[data-page="tools"] .auto-depreciation-toggle.active .toggle-indicator {
    transform: translateX(1.125rem);
    background: #fff;
}

body[data-page="tools"] .auto-depreciation-toggle:hover {
    opacity: 0.85;
}

body[data-page="tools"] .auto-depreciation-toggle:focus-visible {
    outline: 2px solid var(--ios-system-orange, #FF9500);
    outline-offset: 2px;
}

/* Book value display in inventory table */
body[data-page="tools"] .book-value-cell {
    text-align: right;
}

body[data-page="tools"] .book-value-cell .accumulated {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    display: block;
}

/* ============================================================================
   Tabs Navigation (extracted from tools.html inline styles)
   ============================================================================ */

body[data-page="tools"] .tabs-navigation {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

body[data-page="tools"] .tab-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

body[data-page="tools"] .tab-button svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
}

body[data-page="tools"] .tab-button:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="tools"] .tab-button.active {
    background: var(--glass-primary);
    color: #f97316;
    font-weight: 500;
}

body[data-page="tools"] .tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: #f97316;
    border-radius: 2px 2px 0 0;
}

/* Tab Content */
body[data-page="tools"] .tabs-content {
    margin-top: 1.5rem;
}

body[data-page="tools"] .tab-panel {
    display: none;
}

body[data-page="tools"] .tab-panel.active {
    display: block;
    animation: tools-fadeIn 0.3s ease;
}

@keyframes tools-fadeIn {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Tabs */
@media (max-width: 48em) {
    body[data-page="tools"] .tabs-navigation {
        flex-direction: column;
        gap: 0.25rem;
    }

    body[data-page="tools"] .tab-button {
        width: 100%;
        justify-content: flex-start;
    }

    body[data-page="tools"] .tab-button.active::after {
        left: 0;
        bottom: 0;
        top: 0;
        width: 3px;
        height: auto;
        border-radius: 0 2px 2px 0;
    }
}

/* Hover Lift Utility */
body[data-page="tools"] .hover-lift {
    transition: all 0.2s ease;
}

body[data-page="tools"] .hover-lift:hover {
    transform: translateY(-4px);
}

/* ============================================================================
   Contacts Table (extracted from tools.html inline styles)
   ============================================================================ */

body[data-page="tools"] .contacts-table-container {
    overflow-x: auto;
}

body[data-page="tools"] .contacts-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

body[data-page="tools"] .contacts-table thead th {
    padding: 1rem;
    text-align: left;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-primary);
}

body[data-page="tools"] .contacts-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

body[data-page="tools"] .contacts-table thead th.sortable:hover {
    color: var(--text-primary);
}

body[data-page="tools"] .contacts-table thead th.sortable .sort-icon {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.25rem;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

body[data-page="tools"] .contacts-table thead th.sortable:hover .sort-icon {
    opacity: 0.6;
}

body[data-page="tools"] .contacts-table thead th.sortable.sorted .sort-icon {
    opacity: 1;
}

body[data-page="tools"] .contacts-table thead th.text-right {
    text-align: right;
}

body[data-page="tools"] .contacts-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9375rem;
    color: var(--text-primary);
}

body[data-page="tools"] .contacts-table tbody tr {
    transition: background 0.15s ease;
}

body[data-page="tools"] .contacts-table tbody tr:hover {
    background: var(--glass-hover);
}

body[data-page="tools"] .contacts-table tbody td.text-center {
    text-align: center;
}

body[data-page="tools"] .contacts-table tbody td.text-right {
    text-align: right;
}

body[data-page="tools"] .contact-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-sans);
}

body[data-page="tools"] .contact-type-badge.applicant {
    background: rgba(59, 130, 246, 0.1);
    color: var(--ios-system-orange);
}

body[data-page="tools"] .contact-type-badge.current-renter {
    background: rgba(52, 199, 89, 0.1);
    color: var(--ios-system-green);
}

body[data-page="tools"] .contact-type-badge.previous-renter {
    background: rgba(255, 149, 0, 0.1);
    color: var(--ios-system-orange);
}

body[data-page="tools"] .contact-type-badge.other {
    background: rgba(142, 142, 147, 0.1);
    color: var(--text-secondary);
}

body[data-page="tools"] .contact-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
}

body[data-page="tools"] .action-button {
    padding: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-page="tools"] .action-button:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="tools"] .action-button svg {
    width: 1.125rem;
    height: 1.125rem;
}

body[data-page="tools"] .action-button.primary {
    color: var(--ios-system-orange);
}

body[data-page="tools"] .action-button.primary:hover {
    background: rgba(59, 130, 246, 0.1);
}

@media (max-width: 48em) {
    body[data-page="tools"] .contacts-table thead th,
    body[data-page="tools"] .contacts-table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    body[data-page="tools"] .contact-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* ============================================================================
   Subtab Navigation (extracted from tools.html inline styles)
   ============================================================================ */

body[data-page="tools"] .subtab-btn {
    padding: 0.75em 1.5em;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-tertiary);
}

body[data-page="tools"] .subtab-btn.active {
    border-bottom-color: var(--ios-system-orange);
    color: var(--text-primary);
}

body[data-page="tools"] .subtab-btn:hover:not(.active) {
    color: var(--text-secondary);
}

body[data-page="tools"] .subtab-panel {
    display: block;
}

body[data-page="tools"] .subtab-panel.hidden {
    display: none;
}

/**
 * Financial / Bilanz Page Styles
 *
 * Purpose: Styles for Einnahmen & Ausgaben (Income & Expenses) balance sheet view
 * Theme-aware: Uses CSS variables for all colors
 * Dependencies: coeus-master.css (theme variables, utilities)
 *
 * Last modified: 2025-11-13
 */

/* ====================
   Date Range Filters
   ==================== */

body[data-page="financial"] .date-range-filters {

    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
    margin-bottom: 1.5em;
}



body[data-page="financial"] .date-range-btn {

    padding: 0.5em 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}



body[data-page="financial"] .date-range-btn:hover {

    background: var(--glass-hover);
}



body[data-page="financial"] .date-range-btn.active {

    background: var(--ios-system-orange);
    color: var(--text-primary);
    border-color: #f97316;
}



body[data-page="financial"] .custom-date-inputs {

    display: flex;
    gap: 1em;
    align-items: center;
    margin-top: 1em;
}



body[data-page="financial"] .custom-date-inputs input[type="date"] {

    padding: 0.5em 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
}



/* ====================
   Bilanz Layout
   ==================== */

body[data-page="financial"] .bilanz-layout {

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    margin-bottom: 2em;
}



body[data-page="financial"] .bilanz-container {

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    margin-bottom: 2em;
}



@media (max-width: 48em) {

    body[data-page="financial"] .bilanz-layout {

        grid-template-columns: 1fr;
        gap: 1.5em;
    }


}


@media (max-width: 48em) {

    body[data-page="financial"] .bilanz-container {

        grid-template-columns: 1fr;
    }


}


body[data-page="financial"] .bilanz-column {

    display: flex;
    flex-direction: column;
    gap: 1em;
}



body[data-page="financial"] .bilanz-column-header {

    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1em;
}



body[data-page="financial"] .bilanz-column-header h3 {

    margin: 0;
    color: var(--text-primary);
}



body[data-page="financial"] .bilanz-total {

    font-weight: 600;
    color: var(--text-primary);
}



/* ====================
   Category Filters
   ==================== */

body[data-page="financial"] .kategorie-filters {

    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 1em;
}



body[data-page="financial"] .kategorie-filter-btn {

    padding: 0.375em 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    font-size: 0.875em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}



body[data-page="financial"] .kategorie-filter-btn:hover {

    background: var(--glass-hover);
    color: var(--text-primary);
}



body[data-page="financial"] .kategorie-filter-btn.active {

    background: var(--glass-secondary);
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}



/* ====================
   Financial Tables
   ==================== */

body[data-page="financial"] .financial-table {

    width: 100%;
    border-collapse: collapse;
    background: var(--glass-primary);
    border-radius: 8px;
    overflow: hidden;
}



body[data-page="financial"] .financial-table thead {

    background: var(--glass-secondary);
}



body[data-page="financial"] .financial-table th {

    padding: 0.75em 1em;
    text-align: left;
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="financial"] .financial-table th:last-child {

    text-align: right;
}



body[data-page="financial"] .financial-table tbody tr {

    border-bottom: 1px solid var(--glass-border);
    transition: background 0.2s ease;
}



body[data-page="financial"] .financial-table tbody tr:hover {

    background: var(--glass-hover);
}



body[data-page="financial"] .financial-table tbody tr:last-child {

    border-bottom: none;
}



body[data-page="financial"] .financial-table td {

    padding: 0.75em 1em;
    color: var(--text-secondary);
}



body[data-page="financial"] .financial-table td:last-child {

    text-align: right;
}



/* Empty state */
body[data-page="financial"] .financial-table tbody tr td[colspan] {

    text-align: center;
    padding: 2em;
    color: var(--text-tertiary);
}



/* ====================
   Kategorie Badges
   ==================== */

body[data-page="financial"] .kategorie-badge {

    display: inline-block;
    padding: 0.25em 0.625em;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 500;
    background: var(--glass-secondary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}



/* Ausgaben categories */
body[data-page="financial"] .kategorie-betriebskosten {

    background: rgba(255, 149, 0, 0.15);
    border-color: rgba(255, 149, 0, 0.3);
    color: var(--text-primary);
}



body[data-page="financial"] .kategorie-instandhaltung {

    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.3);
    color: var(--text-primary);
}



body[data-page="financial"] .kategorie-verwaltung {

    background: rgba(90, 200, 250, 0.15);
    border-color: rgba(90, 200, 250, 0.3);
    color: var(--text-primary);
}



body[data-page="financial"] .kategorie-versicherung {

    background: rgba(175, 82, 222, 0.15);
    border-color: rgba(175, 82, 222, 0.3);
    color: var(--text-primary);
}



body[data-page="financial"] .kategorie-steuern_abgaben {

    background: rgba(255, 45, 85, 0.15);
    border-color: rgba(255, 45, 85, 0.3);
    color: var(--text-primary);
}



body[data-page="financial"] .kategorie-finanzierung {

    background: rgba(88, 86, 214, 0.15);
    border-color: rgba(88, 86, 214, 0.3);
    color: var(--text-primary);
}



body[data-page="financial"] .kategorie-sonstige_ausgaben {

    background: var(--glass-secondary);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}



/* Einnahmen categories */
body[data-page="financial"] .kategorie-mieteinnahmen {

    background: rgba(52, 199, 89, 0.15);
    border-color: rgba(52, 199, 89, 0.3);
    color: var(--text-primary);
}



body[data-page="financial"] .kategorie-nebenkosten {

    background: rgba(48, 209, 88, 0.15);
    border-color: rgba(48, 209, 88, 0.3);
    color: var(--text-primary);
}



body[data-page="financial"] .kategorie-zinsertraege {

    background: rgba(50, 215, 75, 0.15);
    border-color: rgba(50, 215, 75, 0.3);
    color: var(--text-primary);
}



body[data-page="financial"] .kategorie-sonstige_einnahmen {

    background: var(--glass-secondary);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}



/* ====================
   Amount Display
   ==================== */

body[data-page="financial"] .betrag-positiv {

    color: var(--ios-system-green);
    font-weight: 600;
}



body[data-page="financial"] .betrag-negativ {

    color: var(--ios-system-red);
    font-weight: 600;
}



/* ====================
   Balance Footer
   ==================== */

body[data-page="financial"] .balance-footer {

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    padding: 1.5em;
    background: var(--glass-secondary);
    border-radius: 8px;
    margin-top: 2em;
}



@media (max-width: 48em) {

    body[data-page="financial"] .balance-footer {

        grid-template-columns: 1fr;
    }


}


body[data-page="financial"] .balance-item {

    display: flex;
    justify-content: space-between;
    align-items: center;
}



body[data-page="financial"] .balance-label {

    color: var(--text-secondary);
    font-weight: 500;
}



body[data-page="financial"] .balance-amount {

    font-size: 1.25em;
    font-weight: 700;
}



body[data-page="financial"] .balance-item.saldo-item {

    grid-column: 1 / -1;
    padding-top: 1em;
    border-top: 2px solid var(--glass-border);
}



body[data-page="financial"] .balance-item.saldo-item .balance-label {

    font-size: 1.125em;
    color: var(--text-primary);
}



body[data-page="financial"] .balance-item.saldo-item .balance-amount {

    font-size: 1.5em;
}



/* ====================
   Export Button
   ==================== */

body[data-page="financial"] .export-csv-btn {

    padding: 0.5em 1.5em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
}



body[data-page="financial"] .export-csv-btn:hover {

    background: var(--glass-hover);
}



body[data-page="financial"] .export-csv-btn svg {

    width: 1.25em;
    height: 1.25em;
    fill: currentColor;
}



/* ====================
   Responsive Adjustments
   ==================== */

@media (max-width: 48em) {

    body[data-page="financial"] .financial-table {

        font-size: 0.875em;
    }



    body[data-page="financial"] .financial-table th,
body[data-page="financial"] .financial-table td {

        padding: 0.5em 0.75em;
    }



    body[data-page="financial"] .kategorie-filters {

        gap: 0.375em;
    }



    body[data-page="financial"] .kategorie-filter-btn {

        font-size: 0.8125em;
        padding: 0.3125em 0.625em;
    }


}


/* ====================
   Loading State
   ==================== */

body[data-page="financial"] .financial-loading {

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3em;
    color: var(--text-tertiary);
}



body[data-page="financial"] .financial-loading::after {

    content: '';
    width: 2em;
    height: 2em;
    margin-left: 1em;
    border: 3px solid var(--glass-border);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}



@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/**
 * COEUS Design System - Financial Settings Component
 *
 * DESIGN DIRECTION: Refined Swiss Banking Aesthetic
 * - Clean, structured sections with elegant glass cards
 * - Warm amber accent color echoing the marble background
 * - Sophisticated typography with clear hierarchy
 * - Subtle animations for premium feel
 *
 * RESPONSIVE: Uses `em` units for true responsiveness
 * BREAKPOINTS: 64em (1024px), 48em (768px), 30em (480px)
 *
 * DEPENDENCIES: core/themes-v2.css, core/glass-system-v2.css
 * LAST UPDATED: 2026-01-17
 */

/* ============================================ */
/*           CSS CUSTOM PROPERTIES              */
/* ============================================ */

.financial-settings-container {
    --fs-accent-amber: rgba(255, 149, 0, 1);
    --fs-accent-amber-soft: rgba(255, 149, 0, 0.15);
    --fs-accent-blue: var(--ios-system-orange);
    --fs-accent-blue-soft: rgba(255, 149, 0, 0.12);
    --fs-accent-green: rgba(52, 199, 89, 1);
    --fs-accent-green-soft: rgba(52, 199, 89, 0.12);
    --fs-accent-purple: rgba(88, 86, 214, 1);
    --fs-accent-purple-soft: rgba(88, 86, 214, 0.12);
    --fs-accent-teal: rgba(90, 200, 250, 1);
    --fs-accent-teal-soft: rgba(90, 200, 250, 0.12);
    --fs-card-bg: rgba(255, 255, 255, 0.06);
    --fs-card-border: rgba(255, 255, 255, 0.1);
    --fs-card-hover: rgba(255, 255, 255, 0.1);
    --fs-input-bg: rgba(0, 0, 0, 0.2);
    --fs-input-border: rgba(255, 255, 255, 0.12);
    --fs-input-focus: rgba(255, 149, 0, 0.4);
    --fs-radius-sm: 0.5em;
    --fs-radius-md: 0.75em;
    --fs-radius-lg: 1em;
    --fs-radius-xl: 1.25em;
    --fs-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --fs-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --fs-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================ */
/*           MAIN CONTAINER                     */
/* ============================================ */

.financial-settings-container {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    animation: fs-fadeIn 0.5s ease-out;
}

@keyframes fs-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/*           SECTION HEADER                     */
/* ============================================ */

.financial-settings-header {
    background: linear-gradient(
        135deg,
        var(--fs-accent-amber-soft) 0%,
        transparent 60%
    );
    border-radius: var(--fs-radius-xl);
    padding: 1.5em 2em;
    border: 1px solid var(--fs-card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.financial-settings-header-content {
    display: flex;
    align-items: center;
    gap: 1em;
}

.financial-settings-icon {
    width: 3em;
    height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--fs-accent-amber) 0%, #ff8c00 100%);
    border-radius: var(--fs-radius-md);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.financial-settings-icon .radix-icon {
    width: 1.5em;
    height: 1.5em;
    color: var(--button-text-on-color);
}

.financial-settings-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.financial-settings-subtitle {
    font-size: 0.875em;
    color: var(--text-secondary);
    margin: 0.25em 0 0 0;
    font-weight: 400;
}

/* ============================================ */
/*           CONTENT GRID                       */
/* ============================================ */

.financial-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5em;
}

.financial-settings-column {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

/* ============================================ */
/*           CARD SYSTEM                        */
/* ============================================ */

.fs-card {
    background: var(--fs-card-bg);
    border: 1px solid var(--fs-card-border);
    border-radius: var(--fs-radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    transition: all var(--fs-transition);
    animation: fs-cardSlide 0.4s ease-out backwards;
}

.fs-card:nth-child(1) { animation-delay: 0.1s; }
.fs-card:nth-child(2) { animation-delay: 0.2s; }

@keyframes fs-cardSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fs-card:hover {
    background: var(--fs-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--fs-shadow-md);
    transform: translateY(-2px);
}

.fs-card-full {
    grid-column: 1 / -1;
    animation-delay: 0.3s;
}

/* Card Header */
.fs-card-header {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--fs-card-border);
    background: rgba(255, 255, 255, 0.02);
}

.fs-card-header-bank {
    justify-content: space-between;
}

.fs-card-header-left {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

.fs-card-icon {
    width: 2.25em;
    height: 2.25em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--fs-radius-sm);
    flex-shrink: 0;
}

.fs-card-icon .radix-icon {
    width: 1.125em;
    height: 1.125em;
}

.fs-card-icon-blue {
    background: var(--fs-accent-blue-soft);
    color: var(--fs-accent-blue);
}

.fs-card-icon-amber {
    background: var(--fs-accent-amber-soft);
    color: var(--fs-accent-amber);
}

.fs-card-icon-green {
    background: var(--fs-accent-green-soft);
    color: var(--fs-accent-green);
}

.fs-card-icon-purple {
    background: var(--fs-accent-purple-soft);
    color: var(--fs-accent-purple);
}

.fs-card-icon-teal {
    background: var(--fs-accent-teal-soft);
    color: var(--fs-accent-teal);
}

.fs-card-title {
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

/* Card Body */
.fs-card-body {
    padding: 1.25em;
}

/* ============================================ */
/*           FORM ELEMENTS                      */
/* ============================================ */

.fs-form-group {
    margin-bottom: 1em;
}

.fs-form-group:last-child {
    margin-bottom: 0;
}

.fs-label {
    display: block;
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fs-select,
.fs-input {
    width: 100%;
    padding: 0.75em 1em;
    font-size: 0.9375em;
    color: var(--text-primary);
    background: var(--fs-input-bg);
    border: 1px solid var(--fs-input-border);
    border-radius: var(--fs-radius-md);
    outline: none;
    transition: all var(--fs-transition);
    font-family: inherit;
}

.fs-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1em center;
    padding-right: 2.5em;
}

.fs-select option {
    background: #1a1a1a;
    color: var(--text-primary);
    padding: 0.5em;
}

/* Override global focus styles - use sunset orange */
.financial-settings-container .fs-input:focus,
.financial-settings-container .fs-select:focus {
    border-color: var(--fs-accent-amber) !important;
    box-shadow: 0 0 0 3px var(--fs-input-focus) !important;
}

.fs-input::placeholder {
    color: var(--text-tertiary);
}

.fs-input-mono {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.875em;
    letter-spacing: 0.02em;
}

/* Input Grids */
.fs-input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1em;
}

.fs-ids-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1em;
}

.fs-form-group-full {
    grid-column: 1 / -1;
}

.fs-date-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1em;
    margin-top: 1em;
    animation: fs-slideDown 0.3s ease-out;
}

/* Fiscal Year Day/Month Grid */
.fs-fiscal-year-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5em;
    margin-top: 1em;
    animation: fs-slideDown 0.3s ease-out;
}

.fs-day-month-row {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.fs-select-day {
    width: 5em;
    flex-shrink: 0;
}

.fs-select-month {
    flex: 1;
    min-width: 8em;
}

.fs-date-separator {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1.125em;
}

@keyframes fs-slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/*           CHECKBOX STYLING                   */
/* ============================================ */

.fs-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75em;
    cursor: pointer;
    font-size: 0.9375em;
    color: var(--text-primary);
    padding: 0.5em 0;
    position: relative;
}

.fs-checkbox-holding {
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid var(--fs-card-border);
}

/* Override global checkbox styles - use sunset orange */
.financial-settings-container .fs-checkbox,
.financial-settings-container input[type="checkbox"].fs-checkbox {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

.fs-checkbox-custom {
    width: 1.25em;
    height: 1.25em;
    border: 2px solid var(--fs-input-border);
    border-radius: 0.3em;
    background: var(--fs-input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--fs-transition);
    flex-shrink: 0;
}

.fs-checkbox-custom::after {
    content: '';
    width: 0.5em;
    height: 0.75em;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
    margin-bottom: 0.15em;
}

.fs-checkbox:checked + .fs-checkbox-custom {
    background: var(--fs-accent-amber) !important;
    border-color: var(--fs-accent-amber) !important;
}

.fs-checkbox:checked + .fs-checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.fs-checkbox:focus-visible + .fs-checkbox-custom {
    box-shadow: 0 0 0 3px var(--fs-input-focus);
}

/* ============================================ */
/*           PENDING SWITCH BANNER              */
/* ============================================ */

.fs-pending-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    margin-top: 1em;
    padding: 0.875em 1em;
    background: linear-gradient(135deg, var(--fs-accent-amber-soft) 0%, transparent 100%);
    border: 1px solid rgba(255, 149, 0, 0.25);
    border-radius: var(--fs-radius-md);
    animation: fs-pulse 2s ease-in-out infinite;
}

@keyframes fs-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 149, 0, 0.2); }
    50% { box-shadow: 0 0 0 4px rgba(255, 149, 0, 0); }
}

.fs-pending-content {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

.fs-pending-content .radix-icon {
    color: var(--fs-accent-amber);
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

.fs-pending-text {
    font-size: 0.875em;
    color: var(--text-primary);
}

.fs-pending-text strong {
    color: var(--fs-accent-amber);
}

.fs-pending-cancel {
    width: 1.75em;
    height: 1.75em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 59, 48, 0.15);
    border: none;
    border-radius: var(--fs-radius-sm);
    color: var(--ios-system-red);
    cursor: pointer;
    transition: all var(--fs-transition);
    flex-shrink: 0;
}

.fs-pending-cancel:hover {
    background: rgba(255, 59, 48, 0.3);
}

/* ============================================ */
/*           FRAMEWORK DESCRIPTION              */
/* ============================================ */

.fs-description {
    margin-top: 1em;
    padding: 0.875em 1em;
    font-size: 0.8125em;
    color: var(--text-secondary);
    background: var(--fs-input-bg);
    border-radius: var(--fs-radius-md);
    border-left: 3px solid var(--fs-accent-blue);
    line-height: 1.5;
}

.fs-description:empty {
    display: none;
}

/* ============================================ */
/*           BANK ACCOUNTS SECTION              */
/* ============================================ */

.fs-add-button {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.625em 1em;
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--button-text-on-color);
    background: linear-gradient(135deg, var(--fs-accent-amber) 0%, #ff8c00 100%);
    border: none;
    border-radius: var(--fs-radius-md);
    cursor: pointer;
    transition: all var(--fs-transition);
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
}

.fs-add-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.4);
}

.fs-add-button .radix-icon {
    width: 1em;
    height: 1em;
}

/* Filter Bar */
.fs-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    margin-bottom: 1.25em;
    flex-wrap: wrap;
}

.fs-filter-chips {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

.fs-chip {
    padding: 0.5em 1em;
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--fs-input-bg);
    border: 1px solid var(--fs-input-border);
    border-radius: 2em;
    cursor: pointer;
    transition: all var(--fs-transition);
    white-space: nowrap;
}

.fs-chip:hover {
    background: var(--fs-card-hover);
    color: var(--text-primary);
}

.fs-chip.active {
    background: var(--fs-accent-amber);
    border-color: var(--fs-accent-amber);
    color: var(--button-text-on-color);
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
}

/* Search */
.fs-search-wrapper {
    position: relative;
    min-width: 12em;
}

.fs-search-wrapper .radix-icon {
    position: absolute;
    left: 0.875em;
    top: 50%;
    transform: translateY(-50%);
    width: 1em;
    height: 1em;
    color: var(--text-tertiary);
    pointer-events: none;
}

.fs-search {
    width: 100%;
    padding: 0.625em 1em 0.625em 2.5em;
    font-size: 0.875em;
    color: var(--text-primary);
    background: var(--fs-input-bg);
    border: 1px solid var(--fs-input-border);
    border-radius: 2em;
    outline: none;
    transition: all var(--fs-transition);
}

.fs-search:focus {
    border-color: var(--fs-accent-amber);
    box-shadow: 0 0 0 3px var(--fs-input-focus);
}

.fs-search::placeholder {
    color: var(--text-tertiary);
}

/* Bank Account Grid */
.fs-bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18em, 1fr));
    gap: 1em;
    max-height: 22em;
    overflow-y: auto;
    padding: 0.25em;
}

.fs-bank-grid::-webkit-scrollbar {
    width: 6px;
}

.fs-bank-grid::-webkit-scrollbar-track {
    background: transparent;
}

.fs-bank-grid::-webkit-scrollbar-thumb {
    background: var(--fs-input-border);
    border-radius: 3px;
}

.fs-bank-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Empty State */
.fs-bank-grid:empty::after {
    content: attr(data-empty-message);
    grid-column: 1 / -1;
    text-align: center;
    padding: 3em;
    color: var(--text-tertiary);
    font-style: italic;
    background: var(--fs-input-bg);
    border-radius: var(--fs-radius-md);
    border: 1px dashed var(--fs-input-border);
}

.fs-account-count {
    margin-top: 1em;
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

/* ============================================ */
/*           BANK ACCOUNT CARD                  */
/* ============================================ */

.bank-account-card {
    background: var(--fs-input-bg);
    border: 1px solid var(--fs-input-border);
    border-radius: var(--fs-radius-md);
    padding: 1em;
    transition: all var(--fs-transition);
    position: relative;
}

.bank-account-card:hover {
    background: var(--fs-card-hover);
    border-color: var(--fs-accent-amber);
    transform: translateY(-2px);
    box-shadow: var(--fs-shadow-sm);
}

.bank-account-card.is-default {
    border-color: var(--fs-accent-green);
}

.bank-account-card.is-default::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--fs-accent-green) 0%, #2ed573 100%);
    border-radius: var(--fs-radius-md) var(--fs-radius-md) 0 0;
}

.bank-account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75em;
}

.bank-account-card-title {
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.bank-account-card-actions {
    display: flex;
    gap: 0.375em;
    opacity: 0;
    transition: opacity var(--fs-transition);
}

.bank-account-card:hover .bank-account-card-actions {
    opacity: 1;
}

.bank-account-card-action {
    width: 1.75em;
    height: 1.75em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fs-card-bg);
    border: none;
    border-radius: var(--fs-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--fs-transition);
}

.bank-account-card-action:hover {
    background: var(--fs-card-hover);
    color: var(--text-primary);
}

.bank-account-card-action.delete:hover {
    background: rgba(255, 59, 48, 0.2);
    color: var(--ios-system-red);
}

.bank-account-iban {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.8125em;
    color: var(--text-secondary);
    margin-bottom: 0.75em;
    letter-spacing: 0.04em;
}

.bank-account-meta {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

.bank-account-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.25em 0.625em;
    font-size: 0.6875em;
    font-weight: 500;
    border-radius: 1em;
    background: var(--fs-card-bg);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bank-account-badge.category-operating {
    background: var(--fs-accent-blue-soft);
    color: var(--fs-accent-blue);
}

.bank-account-badge.category-deposit {
    background: var(--fs-accent-amber-soft);
    color: var(--fs-accent-amber);
}

.bank-account-badge.category-other {
    background: rgba(142, 142, 147, 0.15);
    color: var(--text-tertiary);
}

.bank-account-badge.is-qr {
    background: var(--fs-accent-purple-soft);
    color: var(--fs-accent-purple);
}

.bank-account-badge.is-default-badge {
    background: var(--fs-accent-green-soft);
    color: var(--fs-accent-green);
}

/* ============================================ */
/*           FOOTER & SAVE BUTTON               */
/* ============================================ */

.financial-settings-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5em;
}

.fs-save-button {
    display: flex;
    align-items: center;
    gap: 0.625em;
    padding: 0.875em 2em;
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--button-text-on-color);
    background: linear-gradient(135deg, var(--fs-accent-amber) 0%, #ff8c00 100%);
    border: none;
    border-radius: var(--fs-radius-md);
    cursor: pointer;
    transition: all var(--fs-transition);
    box-shadow: 0 4px 16px rgba(255, 149, 0, 0.35);
}

.fs-save-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 149, 0, 0.45);
}

.fs-save-button:active {
    transform: translateY(0);
}

.fs-save-button .radix-icon {
    width: 1.125em;
    height: 1.125em;
}

/* ============================================ */
/*           HIDDEN UTILITY                     */
/* ============================================ */

.financial-settings-container .hidden {
    display: none !important;
}

/* ============================================ */
/*           RESPONSIVE DESIGN                  */
/* ============================================ */

@media (max-width: 64em) {
    .financial-settings-grid {
        grid-template-columns: 1fr;
    }

    .financial-settings-column {
        display: contents;
    }

    .fs-card {
        animation-delay: 0s !important;
    }
}

@media (max-width: 48em) {
    .financial-settings-header {
        padding: 1.25em;
    }

    .financial-settings-icon {
        width: 2.5em;
        height: 2.5em;
    }

    .financial-settings-title {
        font-size: 1.25em;
    }

    .fs-input-grid,
    .fs-ids-grid,
    .fs-date-grid,
    .fs-fiscal-year-grid {
        grid-template-columns: 1fr;
    }

    .fs-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .fs-filter-chips {
        order: 2;
    }

    .fs-search-wrapper {
        order: 1;
        min-width: 100%;
    }

    .fs-bank-grid {
        grid-template-columns: 1fr;
        max-height: 18em;
    }

    .fs-card-header-bank {
        flex-direction: column;
        gap: 1em;
        align-items: stretch;
    }

    .fs-add-button {
        justify-content: center;
    }
}

@media (max-width: 30em) {
    .financial-settings-header-content {
        flex-direction: column;
        text-align: center;
    }

    .financial-settings-title-group {
        text-align: center;
    }

    .fs-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }

    .bank-account-card-actions {
        opacity: 1;
    }

    .bank-account-meta {
        flex-direction: column;
    }

    .fs-save-button {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================ */
/*           THEME ADJUSTMENTS                  */
/* ============================================ */

/* Light Theme */
[data-theme="light"] .financial-settings-container {
    --fs-card-bg: rgba(0, 0, 0, 0.03);
    --fs-card-border: rgba(0, 0, 0, 0.08);
    --fs-card-hover: rgba(0, 0, 0, 0.05);
    --fs-input-bg: rgba(0, 0, 0, 0.04);
    --fs-input-border: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .fs-select option {
    background: white;
    color: #1a1a1a;
}

/* Light Modern Theme */
[data-theme="lightmodern"] .financial-settings-container {
    --fs-card-bg: rgba(0, 0, 0, 0.04);
    --fs-card-border: rgba(0, 0, 0, 0.1);
    --fs-card-hover: rgba(0, 0, 0, 0.06);
    --fs-input-bg: rgba(0, 0, 0, 0.05);
    --fs-input-border: rgba(0, 0, 0, 0.15);
}

[data-theme="lightmodern"] .fs-select option {
    background: white;
    color: #1a1a1a;
}

/* ============================================ */
/*           ACCESSIBILITY                      */
/* ============================================ */

@media (prefers-reduced-motion: reduce) {
    .financial-settings-container,
    .fs-card,
    .bank-account-card,
    .fs-chip,
    .fs-pending-banner {
        animation: none;
        transition: none;
    }
}

.fs-card:focus-within {
    outline: 2px solid var(--fs-accent-amber);
    outline-offset: 2px;
}

.fs-chip:focus-visible,
.fs-add-button:focus-visible,
.fs-save-button:focus-visible,
.bank-account-card-action:focus-visible {
    outline: 2px solid var(--fs-accent-amber);
    outline-offset: 2px;
}

/* ============================================ */
/*           LOADING STATE                      */
/* ============================================ */

.fs-bank-grid.loading {
    position: relative;
    min-height: 10em;
}

.fs-bank-grid.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2.5em;
    height: 2.5em;
    border: 3px solid var(--fs-input-border);
    border-top-color: var(--fs-accent-amber);
    border-radius: 50%;
    animation: fs-spin 0.8s linear infinite;
}

@keyframes fs-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================ */
/*           BANK ACCOUNT MODAL                 */
/*           Refined Swiss Banking Aesthetic    */
/* ============================================ */

/* Modal Overlay */
.fs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5em;
    animation: fs-modalFadeIn 0.3s ease-out;
}

.fs-modal-overlay.hidden {
    display: none;
}

@keyframes fs-modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Container */
.fs-modal-container {
    width: 100%;
    max-width: 40em;
    max-height: calc(100vh - 3em);
    background: linear-gradient(
        145deg,
        rgba(30, 30, 35, 0.95) 0%,
        rgba(20, 20, 25, 0.98) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--fs-radius-xl);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: fs-modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fs-modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.fs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5em 2em;
    background: linear-gradient(
        180deg,
        var(--fs-accent-amber-soft) 0%,
        transparent 100%
    );
    border-bottom: 1px solid rgba(255, 149, 0, 0.15);
}

.fs-modal-header-content {
    display: flex;
    align-items: center;
    gap: 1em;
}

.fs-modal-icon {
    width: 2.75em;
    height: 2.75em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--fs-accent-amber) 0%, #ff8c00 100%);
    border-radius: var(--fs-radius-md);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.35);
}

.fs-modal-icon .radix-icon {
    width: 1.375em;
    height: 1.375em;
    color: var(--button-text-on-color);
}

.fs-modal-title {
    font-size: 1.375em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.fs-modal-close {
    width: 2.25em;
    height: 2.25em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--fs-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--fs-transition);
}

.fs-modal-close:hover {
    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.3);
    color: var(--ios-system-red);
}

.fs-modal-close .radix-icon {
    width: 1em;
    height: 1em;
}

/* Modal Body */
.fs-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Modal Sections */
.fs-modal-section {
    padding: 1.75em 2em;
    border-bottom: 1px solid var(--fs-card-border);
}

.fs-modal-section:last-child {
    border-bottom: none;
}

.fs-modal-section-header {
    display: flex;
    align-items: center;
    gap: 0.875em;
    margin-bottom: 1.25em;
}

.fs-modal-section-number {
    font-size: 0.6875em;
    font-weight: 700;
    color: var(--fs-accent-amber);
    background: var(--fs-accent-amber-soft);
    padding: 0.25em 0.625em;
    border-radius: 1em;
    letter-spacing: 0.05em;
}

.fs-modal-section-title {
    font-size: 0.8125em;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Form Fields */
.fs-modal-field {
    margin-bottom: 1.125em;
}

.fs-modal-field:last-child {
    margin-bottom: 0;
}

.fs-modal-row {
    display: flex;
    gap: 1em;
    margin-bottom: 1.125em;
}

.fs-modal-row:last-child {
    margin-bottom: 0;
}

.fs-modal-field-grow {
    flex: 1;
    min-width: 0;
}

.fs-modal-field-small {
    flex: 0 0 9em;
}

.fs-modal-field-half {
    flex: 1;
    min-width: 0;
}

.fs-modal-label {
    display: flex;
    align-items: center;
    gap: 0.375em;
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5em;
}

.fs-required {
    color: var(--fs-accent-amber);
    font-weight: 600;
}

.fs-modal-input,
.fs-modal-select {
    width: 100%;
    padding: 0.875em 1em;
    font-size: 0.9375em;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--fs-radius-md);
    outline: none;
    transition: all var(--fs-transition);
    font-family: inherit;
}

.fs-modal-input::placeholder {
    color: var(--text-quaternary);
}

.fs-modal-input:focus,
.fs-modal-select:focus {
    border-color: var(--fs-accent-amber);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.15);
    background: rgba(0, 0, 0, 0.3);
}

.fs-modal-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1em center;
    padding-right: 2.5em;
}

.fs-modal-select option {
    background: #1a1a1a;
    color: var(--text-primary);
    padding: 0.5em;
}

.fs-modal-hint {
    display: block;
    font-size: 0.75em;
    color: var(--text-tertiary);
    margin-top: 0.5em;
    min-height: 1.25em;
}

.fs-modal-hint.valid {
    color: var(--fs-accent-green);
}

.fs-modal-hint.invalid {
    color: var(--ios-system-red);
}

.fs-modal-helper {
    font-size: 0.8125em;
    color: var(--text-tertiary);
    margin: 1em 0 0 0;
    padding: 0.875em 1em;
    background: rgba(255, 149, 0, 0.05);
    border-left: 3px solid var(--fs-accent-amber);
    border-radius: 0 var(--fs-radius-sm) var(--fs-radius-sm) 0;
    line-height: 1.5;
}

/* Options Section */
.fs-modal-section-options {
    background: rgba(255, 255, 255, 0.02);
}

.fs-modal-options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

.fs-modal-option {
    display: flex;
    align-items: flex-start;
    gap: 1em;
    padding: 1em 1.25em;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--fs-radius-md);
    cursor: pointer;
    transition: all var(--fs-transition);
}

.fs-modal-option:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

.fs-modal-option:has(.fs-modal-checkbox:checked) {
    background: var(--fs-accent-amber-soft);
    border-color: rgba(255, 149, 0, 0.3);
}

/* Custom Checkbox */
.fs-modal-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.fs-modal-checkbox-custom {
    width: 1.375em;
    height: 1.375em;
    flex-shrink: 0;
    margin-top: 0.125em;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 0.375em;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--fs-transition);
}

.fs-modal-checkbox-custom::after {
    content: '';
    width: 0.5em;
    height: 0.75em;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-bottom: 0.125em;
}

.fs-modal-checkbox:checked + .fs-modal-checkbox-custom {
    background: linear-gradient(135deg, var(--fs-accent-amber) 0%, #ff8c00 100%);
    border-color: var(--fs-accent-amber);
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.35);
}

.fs-modal-checkbox:checked + .fs-modal-checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.fs-modal-checkbox:focus-visible + .fs-modal-checkbox-custom {
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.25);
}

.fs-modal-option-content {
    flex: 1;
    min-width: 0;
}

.fs-modal-option-title {
    display: block;
    font-size: 0.9375em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25em;
}

.fs-modal-option-desc {
    display: block;
    font-size: 0.8125em;
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* Modal Footer */
.fs-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.875em;
    padding: 1.25em 2em;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--fs-card-border);
}

.fs-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.75em 1.5em;
    font-size: 0.9375em;
    font-weight: 500;
    border: none;
    border-radius: var(--fs-radius-md);
    cursor: pointer;
    transition: all var(--fs-transition);
    font-family: inherit;
}

.fs-modal-btn .radix-icon {
    width: 1em;
    height: 1em;
}

.fs-modal-btn-secondary {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.fs-modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.fs-modal-btn-primary {
    color: var(--button-text-on-color);
    background: linear-gradient(135deg, var(--fs-accent-amber) 0%, #ff8c00 100%);
    box-shadow: 0 2px 12px rgba(255, 149, 0, 0.35);
}

.fs-modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 149, 0, 0.45);
}

.fs-modal-btn-primary:active {
    transform: translateY(0);
}

/* Responsive Modal */
@media (max-width: 48em) {
    .fs-modal-overlay {
        padding: 1em;
        align-items: flex-end;
    }

    .fs-modal-container {
        max-height: 90vh;
        border-radius: var(--fs-radius-xl) var(--fs-radius-xl) 0 0;
    }

    .fs-modal-header,
    .fs-modal-section,
    .fs-modal-footer {
        padding-left: 1.5em;
        padding-right: 1.5em;
    }

    .fs-modal-row {
        flex-direction: column;
        gap: 1.125em;
    }

    .fs-modal-field-small,
    .fs-modal-field-half {
        flex: none;
    }

    .fs-modal-footer {
        flex-direction: column-reverse;
        gap: 0.625em;
    }

    .fs-modal-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Light Theme Adjustments */
[data-theme="light"] .fs-modal-container,
[data-theme="lightmodern"] .fs-modal-container {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(248, 248, 250, 0.98) 100%
    );
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .fs-modal-input,
[data-theme="light"] .fs-modal-select,
[data-theme="lightmodern"] .fs-modal-input,
[data-theme="lightmodern"] .fs-modal-select {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .fs-modal-input:focus,
[data-theme="light"] .fs-modal-select:focus,
[data-theme="lightmodern"] .fs-modal-input:focus,
[data-theme="lightmodern"] .fs-modal-select:focus {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .fs-modal-select option,
[data-theme="lightmodern"] .fs-modal-select option {
    background: white;
    color: #1a1a1a;
}

[data-theme="light"] .fs-modal-option,
[data-theme="lightmodern"] .fs-modal-option {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .fs-modal-option:hover,
[data-theme="lightmodern"] .fs-modal-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .fs-modal-checkbox-custom,
[data-theme="lightmodern"] .fs-modal-checkbox-custom {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .fs-modal-btn-secondary,
[data-theme="lightmodern"] .fs-modal-btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* ============================================ */
/*           FRAMEWORK SWITCH MODAL             */
/* ============================================ */

#framework-switch-modal .modal-content {
    max-width: 32em;
    border-radius: var(--fs-radius-lg);
}

#framework-switch-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--fs-card-border);
}

#framework-switch-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75em;
    padding-top: 1em;
    border-top: 1px solid var(--fs-card-border);
}

/* Warning Box */
.warning-box {
    background: linear-gradient(135deg, var(--fs-accent-amber-soft) 0%, transparent 100%);
    border: 1px solid rgba(255, 149, 0, 0.25);
    border-radius: var(--fs-radius-md);
    padding: 1em;
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
}

.warning-box .radix-icon {
    flex-shrink: 0;
    color: var(--fs-accent-amber);
}

/* Option Cards */
.option-card {
    background: var(--fs-input-bg);
    border: 2px solid var(--fs-input-border);
    border-radius: var(--fs-radius-md);
    padding: 1em;
    cursor: pointer;
    transition: all var(--fs-transition);
}

.option-card:hover {
    background: var(--fs-card-hover);
}

.option-card:has(input:checked) {
    border-color: var(--fs-accent-amber);
    background: var(--fs-accent-amber-soft);
}

/* Disclaimer Box */
.disclaimer-box {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.08) 0%, transparent 100%);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: var(--fs-radius-sm);
    padding: 0.75em;
}

/* IBAN Validation */
#iban-validation.valid { color: var(--fs-accent-green); }
#iban-validation.invalid { color: var(--ios-system-red); }
#iban-validation.checking { color: var(--fs-accent-blue); }

/**
 * Email Tools CSS - Outlook-Style Redesign
 *
 * Purpose: Styling for email management in tools page (Outlook-style UI)
 * Dependencies: coeus-master.css (imported via master)
 * Theme-responsive: Uses CSS variables for all colors (supports 5 themes)
 * Responsive: Uses em units, follows mobile-first approach
 *
 * Components:
 * - Email toolbar (Outlook-style)
 * - Folder sidebar with tree view
 * - Email list with avatars and threading
 * - Reading pane (right/bottom configurable)
 * - Compose modal
 * - Skeleton loaders
 * - Density toggle (compact/normal/comfortable)
 * - Search with keyboard hints
 *
 * Features:
 * - 3-pane Outlook layout (folders | list | reading pane)
 * - Configurable reading pane position
 * - Conversation threading UI
 * - Keyboard navigation support
 * - Zoom controls with scale transformation
 * - Mobile-first responsive design
 */

/* ============================================================================
   Container Override - Full-width email layout
   ============================================================================ */

body[data-page="email-tools"] #mainContent .container {

    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}



body[data-page="email-tools"] #mainContent .container > *:not(.email-layout):not(.email-toolbar) {

    padding: 0 1em;
}



/* ============================================================================
   EMAIL TOOLBAR (Outlook-Style)
   ============================================================================ */

body[data-page="email-tools"] .email-toolbar {

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 1em;
    margin-bottom: 0.5em;
    gap: 1em;
    border-radius: 0.5em;
}



body[data-page="email-tools"] .email-toolbar-left,
body[data-page="email-tools"] .email-toolbar-right {

    display: flex;
    align-items: center;
    gap: 0.25em;
}



body[data-page="email-tools"] .email-toolbar-center {

    flex: 1;
    max-width: 30em;
    margin: 0 auto;
}



body[data-page="email-tools"] .email-toolbar-divider {

    width: 1px;
    height: 1.5em;
    background: var(--glass-border);
    margin: 0 0.25em;
}



body[data-page="email-tools"] .email-toolbar-btn {

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375em;
    padding: 0.5em 0.625em;
    background: transparent;
    border: none;
    border-radius: 0.375em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.8125em;
    font-weight: 500;
}



body[data-page="email-tools"] .email-toolbar-btn:hover {

    background: var(--glass-hover);
    color: var(--text-primary);
}



body[data-page="email-tools"] .email-toolbar-btn:active {

    transform: scale(0.95);
}



body[data-page="email-tools"] .email-toolbar-btn--primary {

    background: var(--ios-system-orange);
    color: var(--text-primary);
    padding: 0.5em 1em;
}



body[data-page="email-tools"] .email-toolbar-btn--primary:hover {

    background: var(--ios-system-orange);
    opacity: 0.9;
    color: var(--text-primary);
}



/* Search Box */
body[data-page="email-tools"] .email-search-box {

    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.75em;
    background: var(--glass-container-thin);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    transition: all 0.2s ease;
}



body[data-page="email-tools"] .email-search-box:focus-within {

    border-color: var(--ios-system-orange);
    background: var(--glass-primary);
}



body[data-page="email-tools"] .email-search-icon {

    color: var(--text-tertiary);
    flex-shrink: 0;
}



body[data-page="email-tools"] .email-search-input {

    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.875em;
    outline: none;
    min-width: 10em;
}



body[data-page="email-tools"] .email-search-input::placeholder {

    color: var(--text-tertiary);
}



body[data-page="email-tools"] .email-search-kbd {

    padding: 0.125em 0.375em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.25em;
    color: var(--text-tertiary);
    font-size: 0.75em;
    font-family: monospace;
}



/* Density Toggle */
body[data-page="email-tools"] .email-density-toggle,
body[data-page="email-tools"] .email-pane-toggle {

    display: flex;
    align-items: center;
    gap: 0.125em;
    padding: 0.125em;
    background: var(--glass-container-thin);
    border-radius: 0.375em;
}



body[data-page="email-tools"] .email-density-btn,
body[data-page="email-tools"] .email-pane-btn {

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375em;
    background: transparent;
    border: none;
    border-radius: 0.25em;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s ease;
}



body[data-page="email-tools"] .email-density-btn:hover,
body[data-page="email-tools"] .email-pane-btn:hover {

    background: var(--glass-hover);
    color: var(--text-secondary);
}



body[data-page="email-tools"] .email-density-btn.active,
body[data-page="email-tools"] .email-pane-btn.active {

    background: var(--glass-primary);
    color: var(--ios-system-orange);
}



/* ============================================================================
   OUTLOOK 3-PANE LAYOUT
   ============================================================================ */

body[data-page="email-tools"] .email-layout--outlook {

    display: grid;
    gap: 0.5em;
    height: calc(100vh - 10em);
    padding: 0 0.5em 0.5em;
    transition: grid-template-columns 0.3s ease, grid-template-rows 0.3s ease;
}



/* Reading pane on RIGHT (default) */
body[data-page="email-tools"] .email-layout--outlook[data-pane="right"] {

    grid-template-columns: 14em 1fr 1.5fr;
    grid-template-rows: 1fr;
}



/* Reading pane on BOTTOM */
body[data-page="email-tools"] .email-layout--outlook[data-pane="bottom"] {

    grid-template-columns: 14em 1fr;
    grid-template-rows: 1fr 1fr;
}



body[data-page="email-tools"] .email-layout--outlook[data-pane="bottom"] .email-reading-pane {

    grid-column: 2;
    grid-row: 2;
}



/* Reading pane OFF */
body[data-page="email-tools"] .email-layout--outlook[data-pane="off"] {

    grid-template-columns: 14em 1fr;
}



body[data-page="email-tools"] .email-layout--outlook[data-pane="off"] .email-reading-pane {

    display: none;
}



/* Collapsed folders */
body[data-page="email-tools"] .email-layout--outlook.collapsed-folders {

    grid-template-columns: 3em 1fr 1.5fr;
}



body[data-page="email-tools"] .email-layout--outlook.collapsed-folders[data-pane="bottom"] {

    grid-template-columns: 3em 1fr;
}



body[data-page="email-tools"] .email-layout--outlook.collapsed-folders[data-pane="off"] {

    grid-template-columns: 3em 1fr;
}



/* ============================================================================
   DENSITY VARIATIONS
   ============================================================================ */

/* Compact density - tight spacing */
body[data-page="email-tools"] .email-layout--outlook.density-compact .email-item {

    padding: 0.5em 0.75em;
    gap: 0.5em;
}



body[data-page="email-tools"] .email-layout--outlook.density-compact .email-from {

    font-size: 0.8125em;
}



body[data-page="email-tools"] .email-layout--outlook.density-compact .email-subject {

    font-size: 0.8125em;
}



body[data-page="email-tools"] .email-layout--outlook.density-compact .email-preview {

    font-size: 0.75em;
    display: none; /* Hide preview in compact mode */
}



body[data-page="email-tools"] .email-layout--outlook.density-compact .email-date {

    font-size: 0.75em;
}



body[data-page="email-tools"] .email-layout--outlook.density-compact .email-avatar {

    width: 1.75em;
    height: 1.75em;
    font-size: 0.625em;
}



/* Normal density - default */
body[data-page="email-tools"] .email-layout--outlook.density-normal .email-item {

    padding: 0.75em;
    gap: 0.75em;
}



/* Comfortable density - more breathing room */
body[data-page="email-tools"] .email-layout--outlook.density-comfortable .email-item {

    padding: 1em;
    gap: 1em;
}



body[data-page="email-tools"] .email-layout--outlook.density-comfortable .email-from {

    font-size: 1em;
}



body[data-page="email-tools"] .email-layout--outlook.density-comfortable .email-subject {

    font-size: 0.9375em;
}



body[data-page="email-tools"] .email-layout--outlook.density-comfortable .email-preview {

    font-size: 0.875em;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}



body[data-page="email-tools"] .email-layout--outlook.density-comfortable .email-date {

    font-size: 0.875em;
}



body[data-page="email-tools"] .email-layout--outlook.density-comfortable .email-avatar {

    width: 2.5em;
    height: 2.5em;
    font-size: 0.875em;
}



/* ============================================================================
   FOLDERS SIDEBAR (Outlook-style)
   ============================================================================ */

body[data-page="email-tools"] .email-folders-sidebar {

    display: flex;
    flex-direction: column;
    background: var(--glass-container-thin);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    overflow: hidden;
    transition: width 0.3s ease, min-width 0.3s ease;
}



body[data-page="email-tools"] .email-folders-header {

    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.75em;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="email-tools"] .email-folder-toggle {

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25em;
    background: transparent;
    border: none;
    border-radius: 0.25em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}



body[data-page="email-tools"] .email-folder-toggle:hover {

    background: var(--glass-hover);
}



body[data-page="email-tools"] .folder-toggle-icon {

    transition: transform 0.3s ease;
}



body[data-page="email-tools"] .email-folders-sidebar.collapsed .folder-toggle-icon {

    transform: rotate(180deg);
}



body[data-page="email-tools"] .email-folders-title {

    flex: 1;
    font-size: 0.8125em;
    font-weight: 600;
    color: var(--text-primary);
}



body[data-page="email-tools"] .email-folder-add {

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25em;
    background: transparent;
    border: none;
    border-radius: 0.25em;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s ease;
}



body[data-page="email-tools"] .email-folder-add:hover {

    background: var(--glass-hover);
    color: var(--text-secondary);
}



/* Collapsed state */
body[data-page="email-tools"] .email-folders-sidebar.collapsed {

    min-width: 3em;
    width: 3em;
}



body[data-page="email-tools"] .email-folders-sidebar.collapsed .email-folders-title,
body[data-page="email-tools"] .email-folders-sidebar.collapsed .email-folder-add,
body[data-page="email-tools"] .email-folders-sidebar.collapsed .email-folders {

    display: none;
}



/* ============================================================================
   Email Layout (Two Column)
   ============================================================================ */

body[data-page="email-tools"] .email-layout {

    display: grid;
    grid-template-columns: 18.75em 1fr;
    gap: 1.5em;
    min-height: 37.5em;
    padding: 0.5em; /* Minimal padding for edges */
    width: 100%;
    box-sizing: border-box;
}



@media (max-width: 48em) {

    body[data-page="email-tools"] .email-layout {

        grid-template-columns: 1fr;
    }


}


/* ============================================================================
   Email Folders Sidebar
   ============================================================================ */

body[data-page="email-tools"] .email-folders {

    display: flex;
    flex-direction: column;
    gap: 0.5em;
}



body[data-page="email-tools"] .email-folder-item {

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 0.75em; /* Reduced padding for compact layout */
    border-radius: 0.5em;
    color: var(--text-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}



body[data-page="email-tools"] .email-folder-item:hover {

    background: var(--glass-hover);
}



body[data-page="email-tools"] .email-folder-item.active {

    background: var(--glass-primary);
    color: var(--ios-system-orange);
    font-weight: 500;
}



body[data-page="email-tools"] .email-folder-icon {

    width: 1.25em;
    height: 1.25em;
    margin-right: 0.75em;
}



body[data-page="email-tools"] .email-folder-count {

    padding: 0.25em 0.5em;
    border-radius: 0.75em;
    background: var(--glass-secondary);
    color: var(--text-secondary);
    font-size: 0.75em;
    font-weight: 500;
}



/* ============================================================================
   Email List
   ============================================================================ */

body[data-page="email-tools"] .email-list {

    display: flex;
    flex-direction: column;
    gap: 0.5em;
}



body[data-page="email-tools"] .email-item {

    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75em; /* Reduced gap */
    padding: 0.75em; /* Reduced padding for compact layout */
    border-radius: 0.5em;
    background: var(--glass-container-thin);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s ease;
}



body[data-page="email-tools"] .email-item:hover {

    background: var(--glass-hover);
    transform: translateY(-2px);
}



body[data-page="email-tools"] .email-item.unread {

    background: var(--glass-primary);
    border-color: #f97316;
}



body[data-page="email-tools"] .email-item.unread .email-subject {

    font-weight: 600;
}



body[data-page="email-tools"] .email-checkbox {

    display: flex;
    align-items: center;
    padding-top: 0.25em;
}



body[data-page="email-tools"] .email-checkbox input[type="checkbox"] {

    width: 1.125em;
    height: 1.125em;
    border-radius: 0.25em;
    border: 1px solid var(--glass-border);
    cursor: pointer;
}



body[data-page="email-tools"] .email-content {

    display: flex;
    flex-direction: column;
    gap: 0.25em;
    min-width: 0;
}



body[data-page="email-tools"] .email-from {

    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9em; /* Slightly smaller for compact layout */
}



body[data-page="email-tools"] .email-subject {

    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.875em; /* Slightly smaller for compact layout */
    white-space: nowrap;
}



body[data-page="email-tools"] .email-preview {

    color: var(--text-tertiary);
    font-size: 0.875em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



body[data-page="email-tools"] .email-meta {

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125em; /* Reduced gap for compact layout */
    flex-shrink: 0;
}



body[data-page="email-tools"] .email-date {

    color: var(--text-secondary);
    font-size: 0.8125em; /* Slightly smaller for compact layout */
    white-space: nowrap;
}



body[data-page="email-tools"] .email-attachment-icon {

    width: 1em;
    height: 1em;
    color: var(--text-tertiary);
}



/* ============================================================================
   Email Viewer
   ============================================================================ */

body[data-page="email-tools"] .email-viewer {

    display: flex;
    flex-direction: column;
    gap: 1.5em;
}



body[data-page="email-tools"] .email-viewer-header {

    display: flex;
    flex-direction: column;
    gap: 1em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="email-tools"] .email-viewer-actions {

    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}



body[data-page="email-tools"] .email-viewer-subject {

    color: var(--text-primary);
}



body[data-page="email-tools"] .email-viewer-from {

    display: flex;
    align-items: center;
    gap: 0.5em;
    color: var(--text-secondary);
}



body[data-page="email-tools"] .email-viewer-body {

    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}



body[data-page="email-tools"] .email-attachments {

    display: flex;
    flex-direction: column;
    gap: 0.5em;
}



body[data-page="email-tools"] .email-attachment {

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75em 1em;
    border-radius: 0.5em;
    background: var(--glass-container-thin);
    border: 1px solid var(--glass-border);
}



body[data-page="email-tools"] .email-attachment-info {

    display: flex;
    align-items: center;
    gap: 0.75em;
}



body[data-page="email-tools"] .email-attachment-icon {

    width: 2em;
    height: 2em;
    color: var(--text-secondary);
}



body[data-page="email-tools"] .email-attachment-details {

    display: flex;
    flex-direction: column;
    gap: 0.125em;
}



body[data-page="email-tools"] .email-attachment-name {

    color: var(--text-primary);
    font-weight: 500;
}



body[data-page="email-tools"] .email-attachment-size {

    color: var(--text-tertiary);
    font-size: 0.875em;
}



/* ============================================================================
   EMAIL LIST COLUMN (Outlook-style)
   ============================================================================ */

body[data-page="email-tools"] .email-list-column {

    display: flex;
    flex-direction: column;
    background: var(--glass-container-thin);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    overflow: hidden;
}



body[data-page="email-tools"] .email-list-header {

    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.5em 0.75em;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-secondary);
}



body[data-page="email-tools"] .email-list-select-all {

    display: flex;
    align-items: center;
}



body[data-page="email-tools"] .email-checkbox-input {

    width: 1em;
    height: 1em;
    accent-color: var(--ios-system-orange);
    cursor: pointer;
}



body[data-page="email-tools"] .email-list-sort {

    flex: 1;
}



body[data-page="email-tools"] .email-sort-btn {

    display: flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.25em 0.5em;
    background: transparent;
    border: none;
    border-radius: 0.25em;
    color: var(--text-secondary);
    font-size: 0.75em;
    cursor: pointer;
    transition: all 0.15s ease;
}



body[data-page="email-tools"] .email-sort-btn:hover {

    background: var(--glass-hover);
}



body[data-page="email-tools"] .email-list-count {

    font-size: 0.75em;
    color: var(--text-tertiary);
}



/* Email List Container */
body[data-page="email-tools"] .email-list {

    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}



/* Email Item with Avatar */
body[data-page="email-tools"] .email-item {

    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 0.625em;
    padding: 0.75em;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.15s ease;
}



body[data-page="email-tools"] .email-item:hover {

    background: var(--glass-hover);
}



body[data-page="email-tools"] .email-item.selected {

    background: var(--glass-primary);
    border-left: 2px solid var(--ios-system-orange);
}



body[data-page="email-tools"] .email-item.unread {

    background: var(--glass-secondary);
}



body[data-page="email-tools"] .email-item.unread .email-from,
body[data-page="email-tools"] .email-item.unread .email-subject {

    font-weight: 600;
}



/* Density variations */
body[data-page="email-tools"] .email-layout[data-density="compact"] .email-item {

    padding: 0.5em 0.75em;
    gap: 0.5em;
}



body[data-page="email-tools"] .email-layout[data-density="compact"] .email-from,
body[data-page="email-tools"] .email-layout[data-density="compact"] .email-subject {

    font-size: 0.8125em;
}



body[data-page="email-tools"] .email-layout[data-density="comfortable"] .email-item {

    padding: 1em 0.75em;
    gap: 0.75em;
}



/* Email Checkbox */
body[data-page="email-tools"] .email-item-checkbox {

    display: flex;
    align-items: flex-start;
    padding-top: 0.125em;
}



/* Email Avatar */
body[data-page="email-tools"] .email-avatar {

    width: 2.25em;
    height: 2.25em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125em;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--ios-system-orange);
    flex-shrink: 0;
}



body[data-page="email-tools"] .email-avatar--image {

    background-size: cover;
    background-position: center;
}



/* Avatar color variations based on first letter */
body[data-page="email-tools"] .email-avatar[data-color="blue"] {
 background: #FF9500; }


body[data-page="email-tools"] .email-avatar[data-color="green"] {
 background: #22c55e; }


body[data-page="email-tools"] .email-avatar[data-color="purple"] {
 background: #a855f7; }


body[data-page="email-tools"] .email-avatar[data-color="orange"] {
 background: #f97316; }


body[data-page="email-tools"] .email-avatar[data-color="pink"] {
 background: #ec4899; }


body[data-page="email-tools"] .email-avatar[data-color="teal"] {
 background: #14b8a6; }


body[data-page="email-tools"] .email-avatar[data-color="red"] {
 background: #ef4444; }


body[data-page="email-tools"] .email-avatar[data-color="indigo"] {
 background: #6366f1; }



/* Email Content */
body[data-page="email-tools"] .email-content {

    display: flex;
    flex-direction: column;
    gap: 0.125em;
    min-width: 0;
    overflow: hidden;
}



body[data-page="email-tools"] .email-from {

    font-size: 0.875em;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



body[data-page="email-tools"] .email-subject {

    font-size: 0.8125em;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



body[data-page="email-tools"] .email-preview {

    font-size: 0.75em;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* Email Meta (date, attachment) */
body[data-page="email-tools"] .email-meta {

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25em;
    flex-shrink: 0;
}



body[data-page="email-tools"] .email-date {

    font-size: 0.6875em;
    color: var(--text-secondary);
    white-space: nowrap;
}



body[data-page="email-tools"] .email-badges {

    display: flex;
    gap: 0.25em;
}



body[data-page="email-tools"] .email-badge {

    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.125em;
    height: 1.125em;
    color: var(--text-tertiary);
}



body[data-page="email-tools"] .email-badge svg {

    width: 0.875em;
    height: 0.875em;
}



/* Thread indicator in list */
body[data-page="email-tools"] .email-thread-badge {

    display: flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.125em 0.375em;
    background: var(--glass-secondary);
    border-radius: 0.75em;
    font-size: 0.6875em;
    color: var(--text-secondary);
}



/* ============================================================================
   READING PANE (Outlook-style)
   ============================================================================ */

body[data-page="email-tools"] .email-reading-pane {

    display: flex;
    flex-direction: column;
    background: var(--glass-container-thin);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    overflow: hidden;
}



/* Empty state */
body[data-page="email-tools"] .email-reading-empty {

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 1em;
    padding: 2em;
    text-align: center;
}



body[data-page="email-tools"] .email-reading-empty-icon {

    color: var(--text-quaternary);
    opacity: 0.5;
}



body[data-page="email-tools"] .email-reading-empty-text {

    font-size: 1em;
    color: var(--text-tertiary);
    margin: 0;
}



body[data-page="email-tools"] .email-reading-empty-hint {

    font-size: 0.8125em;
    color: var(--text-quaternary);
    margin: 0;
}



body[data-page="email-tools"] .email-reading-empty-hint kbd {

    padding: 0.125em 0.375em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.25em;
    font-family: monospace;
    font-size: 0.875em;
}



/* Reading content */
body[data-page="email-tools"] .email-reading-content {

    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}



body[data-page="email-tools"] .email-reading-content.hidden {

    display: none;
}



/* Reading actions bar */
body[data-page="email-tools"] .email-reading-actions {

    display: flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.5em 0.75em;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-secondary);
}



body[data-page="email-tools"] .email-action-btn {

    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.625em;
    background: transparent;
    border: none;
    border-radius: 0.375em;
    color: var(--text-secondary);
    font-size: 0.8125em;
    cursor: pointer;
    transition: all 0.15s ease;
}



body[data-page="email-tools"] .email-action-btn:hover {

    background: var(--glass-hover);
    color: var(--text-primary);
}



body[data-page="email-tools"] .email-action-btn--close {

    color: var(--text-tertiary);
}



body[data-page="email-tools"] .email-action-spacer {

    flex: 1;
}



/* Reading header */
body[data-page="email-tools"] .email-reading-header {

    display: flex;
    gap: 0.75em;
    padding: 1em;
    padding-bottom: 0.5em;
}



body[data-page="email-tools"] .email-reading-avatar {

    width: 3em;
    height: 3em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--ios-system-orange);
    flex-shrink: 0;
}



body[data-page="email-tools"] .email-reading-meta {

    display: flex;
    flex-direction: column;
    gap: 0.125em;
    min-width: 0;
}



body[data-page="email-tools"] .email-reading-from {

    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
}



body[data-page="email-tools"] .email-reading-to {

    font-size: 0.8125em;
    color: var(--text-secondary);
}



body[data-page="email-tools"] .email-reading-date {

    font-size: 0.75em;
    color: var(--text-tertiary);
}



body[data-page="email-tools"] .email-reading-subject {

    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 1em;
    margin: 0 0 0.5em 0;
}



/* Thread indicator */
body[data-page="email-tools"] .email-thread-indicator {

    padding: 0 1em;
    margin-bottom: 0.5em;
}



body[data-page="email-tools"] .email-thread-indicator.hidden {

    display: none;
}



body[data-page="email-tools"] .email-thread-toggle {

    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-secondary);
    font-size: 0.8125em;
    cursor: pointer;
    transition: all 0.15s ease;
}



body[data-page="email-tools"] .email-thread-toggle:hover {

    background: var(--glass-hover);
}



body[data-page="email-tools"] .email-thread-toggle svg {

    transition: transform 0.2s ease;
}



body[data-page="email-tools"] .email-thread-toggle.expanded svg {

    transform: rotate(180deg);
}



/* Reading body */
body[data-page="email-tools"] .email-reading-body {

    flex: 1;
    overflow-y: auto;
    padding: 1em;
    color: var(--text-primary);
    line-height: 1.6;
}



body[data-page="email-tools"] .email-reading-body iframe {

    width: 100%;
    min-height: 20em;
    border: none;
    background: var(--glass-container-thin);
}



/* Attachments */
body[data-page="email-tools"] .email-reading-attachments {

    padding: 1em;
    border-top: 1px solid var(--glass-border);
}



body[data-page="email-tools"] .email-reading-attachments.hidden {

    display: none;
}



body[data-page="email-tools"] .email-attachments-title {

    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 0.75em 0;
}



body[data-page="email-tools"] .email-attachments-count {

    font-weight: 400;
    color: var(--text-tertiary);
}



body[data-page="email-tools"] .email-attachments-list {

    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}



body[data-page="email-tools"] .email-attachment-item {

    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    cursor: pointer;
    transition: all 0.15s ease;
}



body[data-page="email-tools"] .email-attachment-item:hover {

    background: var(--glass-hover);
}



body[data-page="email-tools"] .email-attachment-item svg {

    width: 1.25em;
    height: 1.25em;
    color: var(--text-secondary);
}



body[data-page="email-tools"] .email-attachment-item span {

    font-size: 0.8125em;
    color: var(--text-primary);
}



/* ============================================================================
   SKELETON LOADERS
   ============================================================================ */

@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

body[data-page="email-tools"] .email-skeleton-folder,
body[data-page="email-tools"] .email-skeleton-item {

    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}



body[data-page="email-tools"] .email-skeleton-line {

    background: var(--glass-secondary);
    border-radius: 0.25em;
}



body[data-page="email-tools"] .email-skeleton-line--icon {

    width: 1.25em;
    height: 1.25em;
    border-radius: 0.25em;
    flex-shrink: 0;
}



body[data-page="email-tools"] .email-skeleton-line--text {

    height: 0.875em;
    flex: 1;
}



body[data-page="email-tools"] .email-skeleton-checkbox {

    width: 1em;
    height: 1em;
    background: var(--glass-secondary);
    border-radius: 0.25em;
    flex-shrink: 0;
}



body[data-page="email-tools"] .email-skeleton-avatar {

    width: 2.25em;
    height: 2.25em;
    background: var(--glass-secondary);
    border-radius: 50%;
    flex-shrink: 0;
}



body[data-page="email-tools"] .email-skeleton-content {

    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}



body[data-page="email-tools"] .email-skeleton-line--name {

    width: 40%;
    height: 0.875em;
}



body[data-page="email-tools"] .email-skeleton-line--subject {

    width: 70%;
    height: 0.75em;
}



body[data-page="email-tools"] .email-skeleton-line--preview {

    width: 90%;
    height: 0.625em;
}



body[data-page="email-tools"] .email-skeleton-meta {

    width: 3em;
    height: 0.75em;
    background: var(--glass-secondary);
    border-radius: 0.25em;
    flex-shrink: 0;
}



/* ============================================================================
   Compose Modal
   ============================================================================ */

body[data-page="email-tools"] .compose-modal {

    position: fixed;
    bottom: 2em;
    right: 2em;
    width: 37.5em;
    max-width: calc(100vw - 4em);
    background: var(--glass-container);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    box-shadow: 0 1.25em 3.125em rgba(0, 0, 0, 0.2);
    z-index: 1000;
    backdrop-filter: blur(1.5em);
}



body[data-page="email-tools"] .compose-modal-header {

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 1.5em;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="email-tools"] .compose-modal-title {

    color: var(--text-primary);
    font-weight: 600;
}



body[data-page="email-tools"] .compose-modal-close {

    width: 2em;
    height: 2em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0.375em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}



body[data-page="email-tools"] .compose-modal-close:hover {

    background: var(--glass-hover);
    color: var(--text-primary);
}



body[data-page="email-tools"] .compose-modal-body {

    padding: 1.5em;
}



body[data-page="email-tools"] .compose-form {

    display: flex;
    flex-direction: column;
    gap: 1em;
}



body[data-page="email-tools"] .compose-form-field {

    display: flex;
    flex-direction: column;
    gap: 0.5em;
}



body[data-page="email-tools"] .compose-form-label {

    color: var(--text-secondary);
    font-size: 0.875em;
    font-weight: 500;
}



body[data-page="email-tools"] .compose-form-input,
body[data-page="email-tools"] .compose-form-textarea {

    padding: 0.75em 1em;
    border-radius: 0.5em;
    background: var(--glass-container-thin);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    transition: all 0.2s ease;
}



body[data-page="email-tools"] .compose-form-input:focus,
body[data-page="email-tools"] .compose-form-textarea:focus {

    outline: none;
    border-color: #f97316;
    background: var(--glass-primary);
}



body[data-page="email-tools"] .compose-form-textarea {

    min-height: 12.5em;
    resize: vertical;
}



body[data-page="email-tools"] .compose-modal-footer {

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 1.5em;
    border-top: 1px solid var(--glass-border);
}



body[data-page="email-tools"] .compose-attachments {

    display: flex;
    align-items: center;
    gap: 0.5em;
}



/* ============================================================================
   Empty States
   ============================================================================ */

body[data-page="email-tools"] .email-empty-state {

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1em;
    padding: 3em;
    text-align: center;
}



body[data-page="email-tools"] .email-empty-icon {

    width: 4em;
    height: 4em;
    color: var(--text-tertiary);
}



body[data-page="email-tools"] .email-empty-title {

    color: var(--text-primary);
    font-weight: 600;
}



body[data-page="email-tools"] .email-empty-description {

    color: var(--text-secondary);
    max-width: 28em;
}



/* ============================================================================
   Loading States
   ============================================================================ */

body[data-page="email-tools"] .email-loading {

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1em;
    padding: 3em;
}



body[data-page="email-tools"] .email-loading-spinner {

    width: 2.5em;
    height: 2.5em;
    border: 3px solid var(--glass-border);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}



@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

body[data-page="email-tools"] .email-loading-text {

    color: var(--text-secondary);
}



/* ============================================================================
   Responsive Adjustments
   ============================================================================ */

@media (max-width: 48em) {

    body[data-page="email-tools"] .compose-modal {

        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0.75em 0.75em 0 0;
    }



    body[data-page="email-tools"] .email-item {

        grid-template-columns: auto 1fr;
    }



    body[data-page="email-tools"] .email-meta {

        grid-column: 2;
        flex-direction: row;
        justify-content: space-between;
    }



    body[data-page="email-tools"] .email-viewer-actions {

        justify-content: center;
    }


}


/* ============================================================================
   Folder Creation Modal
   ============================================================================ */

body[data-page="email-tools"] .folder-create-form {

    display: flex;
    flex-direction: column;
    gap: 1em;
}



body[data-page="email-tools"] .folder-create-input {

    padding: 0.75em 1em;
    border-radius: 0.5em;
    background: var(--glass-container-thin);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}



body[data-page="email-tools"] .folder-create-input:focus {

    outline: none;
    border-color: #f97316;
}



/* ============================================================================
   Email Login Modal
   ============================================================================ */

body[data-page="email-tools"] .email-login-modal {

    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(0.5em);
}



body[data-page="email-tools"] .email-login-modal.hidden {

    display: none;
}



body[data-page="email-tools"] .email-login-content {

    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1em;
    padding: 2em;
    max-width: 31.25em;
    width: calc(100% - 2em);
    max-height: calc(100vh - 4em);
    overflow-y: auto;
    box-shadow: 0 1.25em 3.125em rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2em) saturate(180%);
}



/* Dark theme - night sky with moon */
body[data-page="email-tools"] [data-theme="dark"] .email-login-content {

    background: rgba(15, 15, 25, 0.96);
    border: 1px solid rgba(255, 160, 80, 0.2);
}



/* Darkart theme - teal to peachy gradient */
body[data-page="email-tools"] [data-theme="darkart"] .email-login-content {

    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(139, 200, 200, 0.3);
}



/* Darkmodern theme - dark marbled abstract */
body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-content {

    background: rgba(30, 25, 25, 0.96);
    border: 1px solid rgba(200, 180, 140, 0.25);
}



/* Lightmodern theme - clean minimal white */
body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-content {

    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(200, 200, 200, 0.3);
}



body[data-page="email-tools"] .email-login-header {

    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin-bottom: 1.5em;
    text-align: center;
}



body[data-page="email-tools"] .email-login-title {

    color: var(--text-primary);
    font-weight: 600;
}



body[data-page="email-tools"] [data-theme="dark"] .email-login-title {

    color: #f5e6d3;
}



body[data-page="email-tools"] [data-theme="darkart"] .email-login-title {

    color: var(--text-primary);
}



body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-title {

    color: #e8e0d0;
}



body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-title {

    color: var(--text-primary);
}



body[data-page="email-tools"] .email-login-subtitle {

    color: #6c757d;
    font-size: 0.875em;
}



body[data-page="email-tools"] [data-theme="dark"] .email-login-subtitle {

    color: #c5b8a8;
}



body[data-page="email-tools"] [data-theme="darkart"] .email-login-subtitle {

    color: #5a6c7d;
}



body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-subtitle {

    color: #b8a898;
}



body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-subtitle {

    color: var(--text-secondary);
}



body[data-page="email-tools"] .email-login-form {

    display: flex;
    flex-direction: column;
    gap: 1.25em;
}



body[data-page="email-tools"] .email-login-field {

    display: flex;
    flex-direction: column;
    gap: 0.5em;
}



body[data-page="email-tools"] .email-login-label {

    color: #495057;
    font-size: 0.875em;
    font-weight: 500;
}



body[data-page="email-tools"] [data-theme="dark"] .email-login-label {

    color: #d5c8b8;
}



body[data-page="email-tools"] [data-theme="darkart"] .email-login-label {

    color: #495057;
}



body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-label {

    color: #c8b8a8;
}



body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-label {

    color: #555;
}



body[data-page="email-tools"] .email-login-input {

    padding: 0.75em 1em;
    border-radius: 0.5em;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
    font-size: 1em;
    transition: all 0.2s ease;
}



/* Light theme */
body[data-page="email-tools"] [data-theme="light"] .email-login-input {

    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
}



/* Light modern theme */
body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-input {

    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(150, 150, 150, 0.25);
    color: var(--text-primary);
}



/* Dark theme */
body[data-page="email-tools"] [data-theme="dark"] .email-login-input {

    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
}



/* Dark art theme */
body[data-page="email-tools"] [data-theme="darkart"] .email-login-input {

    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
}



/* Dark modern theme */
body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-input {

    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-primary) !important;
}



/* Autofill styles for dark and darkart themes */
body[data-page="email-tools"] [data-theme="dark"] .email-login-input:-webkit-autofill,
body[data-page="email-tools"] [data-theme="dark"] .email-login-input:-webkit-autofill:hover,
body[data-page="email-tools"] [data-theme="dark"] .email-login-input:-webkit-autofill:focus,
body[data-page="email-tools"] [data-theme="darkart"] .email-login-input:-webkit-autofill,
body[data-page="email-tools"] [data-theme="darkart"] .email-login-input:-webkit-autofill:hover,
body[data-page="email-tools"] [data-theme="darkart"] .email-login-input:-webkit-autofill:focus {

    -webkit-text-fill-color: var(--text-primary) !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(50, 50, 50, 0.95) inset !important;
    box-shadow: 0 0 0 1000px rgba(50, 50, 50, 0.95) inset !important;


    caret-color: var(--text-primary);
}



/* Autofill styles for darkmodern - pure white text */
body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-input:-webkit-autofill,
body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-input:-webkit-autofill:hover,
body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-input:-webkit-autofill:focus {

    -webkit-text-fill-color: var(--text-primary) !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(40, 35, 35, 0.95) inset !important;
    box-shadow: 0 0 0 1000px rgba(40, 35, 35, 0.95) inset !important;


    caret-color: var(--text-primary);
}



/* Autofill styles for light themes */
body[data-page="email-tools"] [data-theme="light"] .email-login-input:-webkit-autofill,
body[data-page="email-tools"] [data-theme="light"] .email-login-input:-webkit-autofill:hover,
body[data-page="email-tools"] [data-theme="light"] .email-login-input:-webkit-autofill:focus,
body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-input:-webkit-autofill,
body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-input:-webkit-autofill:hover,
body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-input:-webkit-autofill:focus {

    -webkit-text-fill-color: #1a1a1a !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset !important;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset !important;


    caret-color: var(--text-primary);
}



body[data-page="email-tools"] .email-login-input:focus {

    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}



/* Focus states for light themes */
body[data-page="email-tools"] [data-theme="light"] .email-login-input:focus,
body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-input:focus {

    background: rgba(255, 255, 255, 0.98);
    color: var(--text-primary);
}



/* Focus states for dark themes */
body[data-page="email-tools"] [data-theme="dark"] .email-login-input:focus,
body[data-page="email-tools"] [data-theme="darkart"] .email-login-input:focus {

    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}



/* Focus state for darkmodern - pure white */
body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-input:focus {

    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary) !important;
}



body[data-page="email-tools"] .email-login-input::placeholder {

    color: var(--text-tertiary);
}



/* Placeholder for light themes */
body[data-page="email-tools"] [data-theme="light"] .email-login-input::placeholder,
body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-input::placeholder {

    color: var(--text-tertiary);
}



/* Placeholder for dark themes */
body[data-page="email-tools"] [data-theme="dark"] .email-login-input::placeholder,
body[data-page="email-tools"] [data-theme="darkart"] .email-login-input::placeholder,
body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-input::placeholder {

    color: var(--text-tertiary);
}



/* App Password Help */
body[data-page="email-tools"] .email-app-password-help {

    background: rgba(33, 150, 243, 0.08);
    border: 1px solid rgba(33, 150, 243, 0.2);
    border-radius: 0.5em;
    padding: 0.875em;
    margin: 1em 0;
}



body[data-page="email-tools"] .email-app-password-header {

    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.625em;
}



body[data-page="email-tools"] .email-app-password-icon {

    width: 1.25em;
    height: 1.25em;
    color: var(--ios-system-orange);
    flex-shrink: 0;
}



body[data-page="email-tools"] .email-app-password-title {

    font-weight: 600;
    font-size: 0.875em;
    color: var(--ios-system-orange);
}



body[data-page="email-tools"] .email-app-password-text {

    font-size: 0.8125em;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0 0 0.75em 0;
}



body[data-page="email-tools"] .email-app-password-steps {

    font-size: 0.8125em;
}



body[data-page="email-tools"] .email-app-password-steps p {

    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5em 0;
}



body[data-page="email-tools"] .email-app-password-list {

    margin: 0;
    padding-left: 1.25em;
    list-style: disc;
}



body[data-page="email-tools"] .email-app-password-list li {

    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.25em;
}



/* Dark theme overrides */
body[data-page="email-tools"] [data-theme="dark"] .email-app-password-help {

    background: rgba(255, 160, 80, 0.08);
    border: 1px solid rgba(255, 160, 80, 0.2);
}



body[data-page="email-tools"] [data-theme="dark"] .email-app-password-icon,
body[data-page="email-tools"] [data-theme="dark"] .email-app-password-title {

    color: #ffa050;
}



/* Darkart theme overrides */
body[data-page="email-tools"] [data-theme="darkart"] .email-app-password-help {

    background: rgba(100, 180, 180, 0.1);
    border: 1px solid rgba(100, 180, 180, 0.25);
}



body[data-page="email-tools"] [data-theme="darkart"] .email-app-password-icon,
body[data-page="email-tools"] [data-theme="darkart"] .email-app-password-title {

    color: #64b4b4;
}



/* Darkmodern theme overrides */
body[data-page="email-tools"] [data-theme="darkmodern"] .email-app-password-help {

    background: rgba(200, 180, 140, 0.08);
    border: 1px solid rgba(200, 180, 140, 0.2);
}



body[data-page="email-tools"] [data-theme="darkmodern"] .email-app-password-icon,
body[data-page="email-tools"] [data-theme="darkmodern"] .email-app-password-title {

    color: #c8b48c;
}



/* Lightmodern theme overrides */
body[data-page="email-tools"] [data-theme="lightmodern"] .email-app-password-help {

    background: rgba(33, 150, 243, 0.06);
    border: 1px solid rgba(33, 150, 243, 0.15);
}



body[data-page="email-tools"] .email-login-toggle {

    display: flex;
    gap: 0.5em;
    padding: 0.25em;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0.5em;
    border: 1px solid rgba(0, 0, 0, 0.1);
}



body[data-page="email-tools"] [data-theme="dark"] .email-login-toggle {

    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 160, 80, 0.15);
}



body[data-page="email-tools"] [data-theme="darkart"] .email-login-toggle {

    background: rgba(100, 150, 150, 0.1);
    border: 1px solid rgba(100, 150, 150, 0.2);
}



body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-toggle {

    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(200, 180, 140, 0.2);
}



body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-toggle {

    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}



body[data-page="email-tools"] .email-login-toggle-btn {

    flex: 1;
    padding: 0.5em 1em;
    background: transparent;
    border: none;
    border-radius: 0.375em;
    color: #6c757d;
    font-size: 0.875em;
    cursor: pointer;
    transition: all 0.2s ease;
}



body[data-page="email-tools"] [data-theme="dark"] .email-login-toggle-btn {

    color: #c5b8a8;
}



body[data-page="email-tools"] [data-theme="darkart"] .email-login-toggle-btn {

    color: #5a6c7d;
}



body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-toggle-btn {

    color: #b8a898;
}



body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-toggle-btn {

    color: var(--text-secondary);
}



body[data-page="email-tools"] .email-login-toggle-btn.active {

    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
    font-weight: 500;
}



body[data-page="email-tools"] [data-theme="dark"] .email-login-toggle-btn.active {

    background: rgba(255, 160, 80, 0.2);
    color: #ffa050;
}



body[data-page="email-tools"] [data-theme="darkart"] .email-login-toggle-btn.active {

    background: rgba(100, 180, 180, 0.25);
    color: #2a9d8f;
}



body[data-page="email-tools"] [data-theme="darkmodern"] .email-login-toggle-btn.active {

    background: rgba(200, 180, 140, 0.25);
    color: #d4a574;
}



body[data-page="email-tools"] [data-theme="lightmodern"] .email-login-toggle-btn.active {

    background: rgba(255, 149, 0, 0.12);
    color: var(--ios-system-orange);
}



body[data-page="email-tools"] .email-login-manual-fields {

    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75em;
}



body[data-page="email-tools"] .email-login-manual-fields.hidden {

    display: none;
}



body[data-page="email-tools"] .email-login-provider-info {

    padding: 0.75em 1em;
    background: var(--glass-primary);
    border-radius: 0.5em;
    border: 1px solid var(--ios-system-orange);
    display: flex;
    align-items: center;
    gap: 0.75em;
}



body[data-page="email-tools"] .email-login-provider-info.hidden {

    display: none;
}



body[data-page="email-tools"] .email-login-provider-icon {

    width: 1.5em;
    height: 1.5em;
    color: var(--ios-system-green);
}



body[data-page="email-tools"] .email-login-provider-text {

    color: var(--text-primary);
    font-size: 0.875em;
}



body[data-page="email-tools"] .email-login-actions {

    display: flex;
    gap: 0.75em;
    margin-top: 0.5em;
}



body[data-page="email-tools"] .email-login-actions button {

    flex: 1;
}



body[data-page="email-tools"] .email-login-hint {

    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.75em;
    margin-top: 1em;
    line-height: 1.5;
}



body[data-page="email-tools"] .email-login-error {

    padding: 0.75em 1em;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid var(--ios-system-red);
    border-radius: 0.5em;
    color: var(--ios-system-red);
    font-size: 0.875em;
    display: none;
}



body[data-page="email-tools"] .email-login-error.visible {

    display: block;
}



/* ============================================
   3-COLUMN RESPONSIVE EMAIL LAYOUT
   ============================================ */

/* Email Layout Container */
body[data-page="email-tools"] .email-layout {

    display: grid;
    grid-template-columns: 15em 1fr; /* Default: folders open */
    gap: 0.75em;
    height: calc(100vh - 12em);
    transition: grid-template-columns 0.3s ease;
    padding: 0 1em; /* Reduced side padding */
}



/* Default collapsed state for maximum space */
body[data-page="email-tools"] .email-layout.collapsed-folders {

    grid-template-columns: 3em 1fr; /* Folders collapsed by default = MAX space for email list */
}



/* Folders Sidebar */
body[data-page="email-tools"] .email-folders-sidebar {

    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s ease, min-width 0.3s ease;
    min-width: 15em;
    padding: 0.75em !important; /* Reduced padding */
}



body[data-page="email-tools"] .email-folders-sidebar.collapsed {

    min-width: 3em;
    width: 3em;
}



body[data-page="email-tools"] .email-folders-sidebar.collapsed .folder-title,
body[data-page="email-tools"] .email-folders-sidebar.collapsed .folder-action-btn,
body[data-page="email-tools"] .email-folders-sidebar.collapsed .email-folders {

    display: none;
}



body[data-page="email-tools"] .email-folders-sidebar.collapsed .folder-toggle-icon {

    transform: rotate(180deg);
}



body[data-page="email-tools"] .folder-toggle-icon {

    transition: transform 0.3s ease;
}



/* Email List Column */
body[data-page="email-tools"] .email-list-column {

    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 18em;
    padding: 0.75em !important; /* Reduced padding */
}



/* Email Detail Column (Desktop Third Column) */
body[data-page="email-tools"] .email-detail-column {

    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideInRight 0.3s ease;
    padding: 1em !important; /* Reduced padding */
}



body[data-page="email-tools"] .email-detail-column.visible {

    display: flex;
}



/* When email detail is visible, adjust grid - make folders and list MUCH narrower */
body[data-page="email-tools"] .email-layout.showing-detail {

    grid-template-columns: 11em 10em 1fr; /* Narrower email list */
    gap: 0.5em;
    padding: 0.25em; /* Reduce padding even more when email showing */
}



body[data-page="email-tools"] .email-layout.showing-detail.collapsed-folders {

    grid-template-columns: 3em 10em 1fr !important; /* Folders collapsed + VERY narrow email list = MAX space for email! */
    gap: 0.25em !important; /* Minimize gap for maximum space */
    padding: 0.25em !important; /* Minimal edge padding */
}



/* Reduce folder sidebar width when detail is showing (only if NOT collapsed) */
body[data-page="email-tools"] .email-layout.showing-detail .email-folders-sidebar:not(.collapsed) {

    min-width: 11em;
}



/* When collapsed, force to 3em even with showing-detail */
body[data-page="email-tools"] .email-layout.showing-detail .email-folders-sidebar.collapsed {

    min-width: 3em !important;
    width: 3em !important;
}



/* Reduce email list width when detail is showing - VERY narrow! */
body[data-page="email-tools"] .email-layout.showing-detail .email-list-column {

    min-width: 10em !important; /* MUCH narrower - just enough to see subject */
    max-width: 10em !important; /* Force maximum width */
}



/* Email Detail Header */
body[data-page="email-tools"] .email-detail-header {

    display: flex;
    justify-content: flex-end;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="email-tools"] .email-detail-content {

    flex: 1;
    overflow-y: auto;
    overflow-x: auto; /* Allow horizontal scroll for wide emails */
    padding-right: 0.5em;
}



/* Email Preview in List */
body[data-page="email-tools"] .email-preview {

    font-size: 0.8125em;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.25em;
}



body[data-page="email-tools"] .email-item.unread .email-preview {

    color: var(--text-secondary);
}



/* Mobile Overlay (Full-Screen) */
body[data-page="email-tools"] .email-mobile-overlay {

    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-primary);
    backdrop-filter: blur(2em);
    z-index: 1000;
    display: none;
    flex-direction: column;
    animation: slideInUp 0.3s ease;
}



body[data-page="email-tools"] .email-mobile-overlay.visible {

    display: flex;
}



body[data-page="email-tools"] .email-mobile-header {

    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1em;
    background: var(--glass-secondary);
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="email-tools"] .email-mobile-content {

    flex: 1;
    overflow-y: auto;
    padding: 1em;
}



/* Email Detail Content Styling */
body[data-page="email-tools"] .email-detail-subject {

    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75em;
}



body[data-page="email-tools"] .email-detail-meta {

    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="email-tools"] .email-detail-meta-row {

    display: flex;
    gap: 0.5em;
    font-size: 0.875em;
}



body[data-page="email-tools"] .email-detail-meta-label {

    font-weight: 600;
    color: var(--text-secondary);
    min-width: 4em;
}



body[data-page="email-tools"] .email-detail-meta-value {

    color: var(--text-primary);
    flex: 1;
}



/* Email Update Indicator (Subtle) */
body[data-page="email-tools"] .email-update-indicator-subtle {

    display: inline-flex;
    align-items: center;
    margin-left: 0.5em;
    opacity: 0.5;
}



body[data-page="email-tools"] .spinner-tiny {

    width: 1em;
    height: 1em;
    animation: spin 0.8s linear infinite;
}



body[data-page="email-tools"] .spinner-tiny circle {

    opacity: 0.25;
    stroke: currentColor;
    stroke-width: 4;
}



body[data-page="email-tools"] .spinner-tiny path {

    opacity: 0.75;
    fill: currentColor;
}



/* Email Zoom Controls */
body[data-page="email-tools"] .email-zoom-controls {

    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1em;
    padding: 0.5em 0.75em;
    background: var(--glass-container-thin);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    width: fit-content;
}



body[data-page="email-tools"] .email-zoom-btn {

    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2em;
    min-height: 2em;
}



body[data-page="email-tools"] .email-zoom-btn svg {

    width: 16px;
    height: 16px;
}



body[data-page="email-tools"] .email-zoom-level {

    min-width: 3em;
    text-align: center;
    font-weight: 500;
}



body[data-page="email-tools"] .email-detail-body {

    color: var(--text-primary);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-x: auto;
    overflow-y: auto;
    transition: transform 0.2s ease;
    transform-origin: top left;  /* For zoom functionality */
}



body[data-page="email-tools"] .email-detail-body iframe {

    width: 100%;
    max-width: none;
    border: none;
    min-height: 40em;
    height: auto;
    background: var(--glass-container-thin);
}



/* Text-only emails */
body[data-page="email-tools"] .email-text-body {

    white-space: pre-wrap;
    font-family: inherit;
    line-height: 1.6;
    overflow-x: auto;
    max-width: 100%;
    padding: 1em;
    background: var(--glass-container-thin);
    border-radius: 0.5em;
}



/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 68em) {

    /* Tablet: Hide third column by default */
    body[data-page="email-tools"] .email-layout.showing-detail {

        grid-template-columns: 17.5em 1fr;
    }



    body[data-page="email-tools"] .email-detail-column {

        display: none !important;
    }



    /* Show mobile overlay instead */
    body[data-page="email-tools"] .email-mobile-overlay.visible {

        display: flex;
    }


}


@media (max-width: 48em) {

    /* Mobile: Stack folders and list vertically */
    body[data-page="email-tools"] .email-layout {

        grid-template-columns: 1fr;
        gap: 0.5em;
    }



    body[data-page="email-tools"] .email-folders-sidebar {

        min-width: 100%;
        max-height: 40vh;
    }



    body[data-page="email-tools"] .email-folders-sidebar.collapsed {

        max-height: 3em;
        min-width: 100%;
        width: 100%;
    }



    body[data-page="email-tools"] .email-list-column {

        min-width: 100%;
    }



    body[data-page="email-tools"] .email-login-content {

        padding: 1.5em;
    }



    body[data-page="email-tools"] .email-login-manual-fields {

        grid-template-columns: 1fr;
    }


}


/* Email Action Buttons */
body[data-page="email-tools"] .email-detail-actions {

    display: flex;
    gap: 0.5em;
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="email-tools"] .email-action-btn {

    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.875em;
}



body[data-page="email-tools"] .email-action-btn svg {

    width: 14px;
    height: 14px;
}



/* Email Compose Modal Overlay */
body[data-page="email-tools"] .email-compose-overlay {

    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(0.5em);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2em;
}



body[data-page="email-tools"] .email-compose-overlay.hidden {

    display: none;
}



body[data-page="email-tools"] .email-compose-overlay.visible {

    display: flex;
    animation: fadeIn 0.2s ease;
}



/* Compose Modal */
body[data-page="email-tools"] .email-compose-modal {

    max-width: 50em;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.3s ease;
}



body[data-page="email-tools"] .email-compose-header {

    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="email-tools"] .email-compose-form {

    display: flex;
    flex-direction: column;
    gap: 1em;
    flex: 1;
    overflow-y: auto;
}



body[data-page="email-tools"] .email-compose-field {

    display: flex;
    flex-direction: column;
    gap: 0.5em;
}



body[data-page="email-tools"] .email-compose-field label {

    font-size: 0.875em;
    font-weight: 500;
}



body[data-page="email-tools"] .email-compose-input,
body[data-page="email-tools"] .email-compose-textarea {

    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.75em 1em;
    color: var(--text-primary);
    font-size: 1em;
    font-family: inherit;
    transition: all 0.2s ease;
}



body[data-page="email-tools"] .email-compose-input:focus,
body[data-page="email-tools"] .email-compose-textarea:focus {

    outline: none;
    border-color: #f97316;
    background: var(--glass-hover);
}



body[data-page="email-tools"] .email-compose-textarea {

    resize: vertical;
    min-height: 15em;
    font-family: inherit;
}



body[data-page="email-tools"] .email-compose-body-field {

    flex: 1;
}



body[data-page="email-tools"] .email-compose-actions {

    display: flex;
    gap: 0.75em;
    justify-content: flex-end;
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid var(--glass-border);
}



/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(2em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Compose Modal */
@media (max-width: 48em) {

    body[data-page="email-tools"] .email-compose-overlay {

        padding: 1em;
    }



    body[data-page="email-tools"] .email-compose-modal {

        max-width: 100%;
        max-height: calc(100vh - 2em);
    }



    body[data-page="email-tools"] .email-detail-actions {

        flex-wrap: wrap;
    }



    body[data-page="email-tools"] .email-action-btn span {

        display: none;
    }



    body[data-page="email-tools"] .email-action-btn {

        padding: 0.5em;
    }



    /* Zoom controls on mobile */
    body[data-page="email-tools"] .email-zoom-controls {

        width: 100%;
        justify-content: center;
    }



    body[data-page="email-tools"] .email-detail-body iframe {

        min-height: 30em;
    }


}


/* ============================================================================
   RESPONSIVE - Outlook Layout
   ============================================================================ */

/* Tablet - Hide reading pane on right, show mobile overlay */
@media (max-width: 64em) {

    body[data-page="email-tools"] .email-layout--outlook[data-pane="right"] {

        grid-template-columns: 12em 1fr;
    }



    body[data-page="email-tools"] .email-layout--outlook[data-pane="right"] .email-reading-pane {

        display: none;
    }



    body[data-page="email-tools"] .email-layout--outlook.collapsed-folders[data-pane="right"] {

        grid-template-columns: 3em 1fr;
    }



    /* Toolbar adjustments */
    body[data-page="email-tools"] .email-toolbar {

        flex-wrap: wrap;
        gap: 0.5em;
    }



    body[data-page="email-tools"] .email-toolbar-center {

        order: 3;
        flex: 0 0 100%;
        max-width: 100%;
    }



    body[data-page="email-tools"] .email-toolbar-btn span {

        display: none;
    }



    body[data-page="email-tools"] .email-toolbar-btn--primary span {

        display: inline;
    }


}


/* Mobile - Stack everything */
@media (max-width: 48em) {

    body[data-page="email-tools"] .email-layout--outlook {

        grid-template-columns: 1fr !important;
        grid-template-rows: auto 1fr;
        height: calc(100vh - 8em);
    }



    body[data-page="email-tools"] .email-folders-sidebar {

        max-height: 12em;
        overflow-y: auto;
    }



    body[data-page="email-tools"] .email-folders-sidebar.collapsed {

        max-height: 3em;
        min-width: 100%;
        width: 100%;
    }



    body[data-page="email-tools"] .email-layout--outlook .email-reading-pane {

        display: none !important;
    }



    /* Show mobile overlay instead */
    body[data-page="email-tools"] .email-mobile-overlay.visible {

        display: flex;
    }



    /* Toolbar */
    body[data-page="email-tools"] .email-toolbar {

        padding: 0.5em;
    }



    body[data-page="email-tools"] .email-toolbar-divider {

        display: none;
    }



    body[data-page="email-tools"] .email-density-toggle,
body[data-page="email-tools"] .email-pane-toggle {

        display: none;
    }



    body[data-page="email-tools"] .email-search-box {

        padding: 0.375em 0.5em;
    }



    body[data-page="email-tools"] .email-search-kbd {

        display: none;
    }



    /* Email item simplified */
    body[data-page="email-tools"] .email-item {

        grid-template-columns: auto 1fr auto;
    }



    body[data-page="email-tools"] .email-item-checkbox {

        display: none;
    }



    body[data-page="email-tools"] .email-avatar {

        width: 2em;
        height: 2em;
        font-size: 0.75em;
    }


}


/* Large screens - wider reading pane */
@media (min-width: 90em) {

    body[data-page="email-tools"] .email-layout--outlook[data-pane="right"] {

        grid-template-columns: 16em 1fr 2fr;
    }



    body[data-page="email-tools"] .email-layout--outlook.collapsed-folders[data-pane="right"] {

        grid-template-columns: 3em 1fr 2fr;
    }


}


/* Focus styles for keyboard navigation */
body[data-page="email-tools"] .email-item:focus {

    outline: none;
    background: var(--glass-hover);
    box-shadow: inset 0 0 0 2px var(--ios-system-orange);
}



body[data-page="email-tools"] .email-list:focus {

    outline: none;
}



body[data-page="email-tools"] .email-list:focus .email-item.selected {

    box-shadow: inset 0 0 0 2px var(--ios-system-orange);
}


/* ============================================================================
   EMAIL DRAFTS SECTION
   ============================================================================ */

/* Drafts Panel Container */
.email-drafts-panel {
    padding: 1.5em;
    background: var(--glass-primary);
    border-radius: 0.5em;
    min-height: 30em;
}

/* Drafts Header */
.drafts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
    flex-wrap: wrap;
    gap: 1em;
}

/* Drafts List */
.drafts-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

/* Individual Draft Card */
.draft-card {
    transition: all 0.2s ease;
    cursor: pointer;
}

.draft-card:hover {
    background: var(--glass-hover);
    transform: translateX(0.25em);
}

.draft-card.pending-review {
    border-left: 3px solid var(--ios-system-orange);
}

/* Draft Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25em 0.5em;
    border-radius: 0.25em;
    font-size: 0.6875em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.status-gray {
    background: rgba(156, 163, 175, 0.2);
    color: var(--text-secondary);
}

.status-badge.status-orange {
    background: rgba(249, 115, 22, 0.2);
    color: var(--ios-system-orange);
}

.status-badge.status-green {
    background: rgba(34, 197, 94, 0.2);
    color: var(--ios-system-green);
}

.status-badge.status-red {
    background: rgba(239, 68, 68, 0.2);
    color: var(--ios-system-red);
}

.status-badge.status-blue {
    background: rgba(59, 130, 246, 0.2);
    color: var(--ios-system-orange);
}

/* Source Badges */
.source-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25em 0.5em;
    border-radius: 0.25em;
    font-size: 0.6875em;
    font-weight: 500;
    background: var(--glass-secondary);
    color: var(--text-secondary);
}

.source-badge.ai {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    color: #a855f7;
}

/* Drafts Badge on Button */
.drafts-badge {
    position: absolute;
    top: -0.25em;
    right: -0.25em;
    min-width: 1.25em;
    height: 1.25em;
    padding: 0 0.25em;
    border-radius: 0.625em;
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
    font-size: 0.6875em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

#emailDraftsBtn {
    position: relative;
}

#emailDraftsBtn.active {
    background: var(--glass-hover);
    color: var(--ios-system-orange);
}

/* Line clamp for preview text */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Draft Action Buttons */
.draft-card .glass-button-sm {
    padding: 0.375em 0.625em;
    font-size: 0.75em;
}

.draft-card .text-green {
    color: var(--ios-system-green);
}

.draft-card .text-green:hover {
    background: rgba(34, 197, 94, 0.1);
}

.draft-card .text-red {
    color: var(--ios-system-red);
}

.draft-card .text-red:hover {
    background: rgba(239, 68, 68, 0.1);
}

.draft-card .text-blue {
    color: var(--ios-system-orange);
}

.draft-card .text-blue:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* Filter Buttons */
.drafts-header .glass-button-sm.active {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

/* Empty State */
.drafts-list .empty-state {
    grid-column: 1 / -1;
}

/* Responsive adjustments for drafts */
@media (max-width: 48em) {
    .drafts-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .drafts-header .flex {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5em;
    }

    .draft-card {
        padding: 1em;
    }

    .draft-card .flex.gap-sm {
        flex-wrap: wrap;
    }
}



/**
 * @file email-agent-settings.css
 * @purpose Page-specific styles for email agent settings page
 * @dependencies coeus-master.css
 */

/* Status sidebar width using em units for responsive scaling */
body[data-page="email-agent-settings"] .status-sidebar {

  width: 20em; /* 320px at default 16px font size, scales with font-size */
  flex-shrink: 0;
}



/* Large chat panel with orange accent border - clean single container */
body[data-page="email-agent-settings"] .chat-panel-large {

  height: 37.5em; /* 600px at default 16px font size, more balanced */
  min-height: 25em; /* 400px minimum */
  background: var(--glass-primary); /* Single glass background */
  backdrop-filter: var(--blur-regular);
  border: 2px solid var(--accent-9, #f97316); /* Orange accent border */
  border-radius: 1.5em; /* Rounded corners */
  box-shadow: var(--shadow-md); /* Clean shadow without glow */
  overflow: hidden; /* Contain children */
}



/* Simple chat header without gradient */
body[data-page="email-agent-settings"] .email-agent-chat-header {

  padding: 1em;
  border-bottom: 1px solid var(--glass-border);
}



/* Chat status badge with orange accent */
body[data-page="email-agent-settings"] .email-chat-status-badge {

  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.375em 0.75em;
  border-radius: 1.5em;
  background: var(--glass-primary);
  border: 1px solid var(--accent-9, #f97316);
  color: var(--text-primary);
}



/* Chat input container - grid applied directly like chat-modern-embedded3.html */
body[data-page="email-agent-settings"] .rt-Card.email-chat-input-container {

  display: grid !important;
  grid-template-columns: 1fr auto !important; /* textarea takes 1fr, button takes auto */
  align-items: center !important;
  gap: 1em !important;
  padding: 1.5em !important;
  border-top: 1px solid var(--glass-border);
  background: var(--glass-secondary);
}



/* Chat textarea input - bigger and more prominent, override vendor max-width */
body[data-page="email-agent-settings"] .email-chat-textarea {

  background: var(--glass-container-thin);
  border: 1px solid var(--glass-border);
  border-radius: 0.75em;
  padding: 1em 1.25em;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.125em; /* Slightly larger text */
  line-height: 1.5;
  min-height: 3.5em; /* Bigger minimum height */
  width: 100% !important; /* Override vendor styles */
  max-width: none !important; /* Override Radix UI max-width constraint */
  outline: none;
  resize: none;
}



body[data-page="email-agent-settings"] .email-chat-textarea:focus {

  border-color: var(--accent-9, #f97316);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}



/* Send button - circular orange button */
body[data-page="email-agent-settings"] .email-chat-send-btn {

  width: 2.75em;
  height: 2.75em;
  border-radius: 50%;
  background: var(--accent-9, #f97316);
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}



body[data-page="email-agent-settings"] .email-chat-send-btn:hover {

  transform: scale(1.05);
}



body[data-page="email-agent-settings"] .email-chat-send-btn:active {

  transform: scale(0.95);
}



/* Chat message container */
body[data-page="email-agent-settings"] .chat-message {

  display: flex;
  gap: 0.5em;
  max-width: 100%;
}



/* COEUS message variant (assistant messages) */
body[data-page="email-agent-settings"] .chat-message.coeus-message {

  /* Inherits from .chat-message */
}



/* User message variant */
body[data-page="email-agent-settings"] .chat-message.user-message {

  flex-direction: row-reverse; /* Avatar on right for user messages */
}



/* Chat avatar - COEUS gradient */
body[data-page="email-agent-settings"] .chat-avatar {

  width: 2em;
  height: 2em;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}



body[data-page="email-agent-settings"] .chat-avatar.coeus-avatar {

  background: linear-gradient(135deg, #FF9500 0%, #8B5CF6 100%); /* Blue to purple gradient */
}



body[data-page="email-agent-settings"] .chat-avatar.user-avatar {

  background: var(--accent-9, #f97316); /* Orange for user */
}



/* Quick action buttons */
body[data-page="email-agent-settings"] .quick-action {

  transition: transform 0.2s, background 0.2s;
}



body[data-page="email-agent-settings"] .quick-action:hover {

  transform: translateX(0.25em);
  background: var(--glass-hover);
}



/* Toggle switch for auto-polling */
body[data-page="email-agent-settings"] .email-toggle-switch {

  position: relative;
  display: inline-block;
  width: 3em;
  height: 1.75em;
  flex-shrink: 0;
}



body[data-page="email-agent-settings"] .email-toggle-switch input {

  opacity: 0;
  width: 0;
  height: 0;
}



body[data-page="email-agent-settings"] .email-toggle-slider {

  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--glass-secondary);
  border: 1px solid var(--glass-border);
  transition: background 0.3s;
  border-radius: 1.75em;
}



body[data-page="email-agent-settings"] .email-toggle-slider:before {

  position: absolute;
  content: "";
  height: 1.25em;
  width: 1.25em;
  left: 0.2em;
  bottom: 0.2em;
  background: white;
  transition: transform 0.3s;
  border-radius: 50%;
  box-shadow: 0 0.125em 0.25em rgba(0, 0, 0, 0.2);
}



body[data-page="email-agent-settings"] .email-toggle-switch input:checked + .email-toggle-slider {

  background: var(--ios-system-green);
  border-color: var(--ios-system-green);
}



body[data-page="email-agent-settings"] .email-toggle-switch input:checked + .email-toggle-slider:before {

  transform: translateX(1.25em);
}



body[data-page="email-agent-settings"] .email-toggle-switch input:disabled + .email-toggle-slider {

  opacity: 0.5;
  cursor: not-allowed;
}



/**
 * @file rental-applications.css
 * @filepath public/css/pages/rental-applications.css
 * @directory public/css/pages
 * @access_level PUBLIC
 * @security_level LOW
 * @last_updated 2026-03-03 - Merged star-btn and responsive overrides from rental-application-profile.html
 *
 * <file_documentation>
 *   <metadata>
 *     <filename>rental-applications.css</filename>
 *     <filepath>public/css/pages/rental-applications.css</filepath>
 *     <directory>public/css/pages</directory>
 *     <access_level>PUBLIC</access_level>
 *     <security_level>LOW</security_level>
 *   </metadata>
 *
 *   <purpose>
 *     Page-specific styles for rental applications manager:
 *     - Button variants (primary, success)
 *     - Inline property selector with expandable tree
 *     - Hierarchical tree structure (Estate → Building → Unit)
 *     - Collapsible form field sections with accordion animation
 *     - Custom questions builder with dynamic form generation
 *     - Question type selector (Text, MC, SC, Date, Amount, Likert 5)
 *     - Large modal for create project form
 *     - Project card grid and card components
 *     - Status and count badges
 *     - State management classes (hidden, visible-*)
 *     - Modal overlay styles
 *     - Responsive grid layouts
 *     - All sizing uses em units for responsive scaling
 *   </purpose>
 *
 *   <dependencies>
 *     <require>COEUS design system (coeus-master.css)</require>
 *     <require>CSS variables from typography-system.css</require>
 *   </dependencies>
 *
 *   <architecture>
 *     Extends COEUS design system with page-specific components.
 *     All styles use CSS variables for theme responsiveness.
 *     No inline styles - all styling through CSS classes.
 *     Font family: 'Noto Sans JP', 'Noto Sans KR' for UI elements.
 *   </architecture>
 * </file_documentation>
 */

/* Button Variants */

/* Property Selector Dropdown */
body[data-page="rental-applications"] .property-selector {

    position: relative;
}



body[data-page="rental-applications"] .property-selector-btn {

    width: 100%;
    text-align: left;
    justify-content: space-between;
}



/* Property selector panel - inline expandable */
body[data-page="rental-applications"] .property-selector-panel {

    position: relative;
    margin-top: 0.5em;
    animation: slideDown 0.2s ease;
}



body[data-page="rental-applications"] .property-selector-panel 

@keyframes slideDown {

    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Property Tree Structure */
body[data-page="rental-applications"] .property-tree {

    display: flex;
    flex-direction: column;
    gap: 0.25em;
    max-height: 24em;
    overflow-y: auto;
    padding: 0.5em;
}



body[data-page="rental-applications"] .property-group {

    margin-bottom: 0.25em;
}



body[data-page="rental-applications"] .property-group-header {

    display: flex;
    align-items: center;
    gap: 0.625em;
    padding: 0.625em 0.875em;
    border-radius: 0.5em;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 2.75em;
}



body[data-page="rental-applications"] .property-group-header:hover {

    background: var(--glass-hover);
}



body[data-page="rental-applications"] .property-group-content {

    padding-left: 1.75em;
    margin-top: 0.25em;
}



body[data-page="rental-applications"] .property-item,
body[data-page="rental-applications"] .property-item-clickable {

    padding: 0.75em 0.875em;
    border-radius: 0.5em;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.75em;
    flex: 1;
    min-height: 2.75em;
}



body[data-page="rental-applications"] .property-item:hover,
body[data-page="rental-applications"] .property-item-clickable:hover {

    background: var(--glass-hover);
}



body[data-page="rental-applications"] .property-item.selected,
body[data-page="rental-applications"] .property-item-clickable.selected {

    background: var(--ios-system-orange);
    color: var(--text-primary);
}



body[data-page="rental-applications"] .property-item-icon {

    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    opacity: 0.8;
}



body[data-page="rental-applications"] .property-item-label {

    flex: 1;
    font-size: 1em;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.4;
}



body[data-page="rental-applications"] .property-item-count {

    font-size: 0.75em;
    padding: 0.25em 0.625em;
    border-radius: 0.375em;
    background: var(--glass-secondary);
    color: var(--text-secondary);
    margin-left: auto;
    font-weight: 500;
    white-space: nowrap;
}



body[data-page="rental-applications"] .toggle-icon {

    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    color: var(--text-secondary);
    opacity: 0.7;
}



body[data-page="rental-applications"] .property-level-1 {

    padding-left: 2em;
}



body[data-page="rental-applications"] .property-level-2 {

    padding-left: 4em;
}



/* Loading Spinner - reuse existing pattern */
body[data-page="rental-applications"] .loading-spinner {

    width: 2.5rem;
    height: 2.5rem;
    border: 4px solid var(--glass-border);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}



@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Grid */
body[data-page="rental-applications"] .projects-grid {

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}



@media (max-width: 68em) {

    body[data-page="rental-applications"] .projects-grid {

        grid-template-columns: repeat(2, 1fr);
    }


}


@media (max-width: 48em) {

    body[data-page="rental-applications"] .projects-grid {

        grid-template-columns: 1fr;
    }


}


/* State Management Classes */
body[data-page="rental-applications"] .hidden {

    display: none;
}



body[data-page="rental-applications"] .visible-block {

    display: block;
}



body[data-page="rental-applications"] .visible-flex {

    display: flex;
}



body[data-page="rental-applications"] .visible-grid {

    display: grid;
}



/* Modal Overlay - Account for sidebar */
body[data-page="rental-applications"] .modal-overlay {

    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 15.03rem; /* Sidebar width */
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}




/* Create Project Modal - Centered and sized appropriately */
body[data-page="rental-applications"] #createProjectModal > .glass-card {

    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}



/* Project Card Styles */
body[data-page="rental-applications"] .project-card {

    cursor: pointer;
    transition: all 0.2s ease;
}



body[data-page="rental-applications"] .project-card:hover {

    transform: translateY(-2px);
}



/* Status Badges */
body[data-page="rental-applications"] .status-badge {

    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-family: 'Noto Sans JP', 'Noto Sans KR', sans-serif;
}



body[data-page="rental-applications"] .status-badge-active {

    background: var(--ios-system-green);
    color: var(--text-primary);
}



body[data-page="rental-applications"] .status-badge-closed {

    background: var(--ios-system-red);
    color: var(--text-primary);
}



body[data-page="rental-applications"] .status-badge-archived {

    background: var(--text-tertiary);
    color: var(--text-primary);
}



/* Application Count Badges */
body[data-page="rental-applications"] .count-badge {

    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Noto Sans JP', 'Noto Sans KR', sans-serif;
}



body[data-page="rental-applications"] .count-badge-neutral {

    background: var(--glass-primary);
    color: var(--text-secondary);
}



body[data-page="rental-applications"] .count-badge-blue {

    background: var(--ios-system-orange);
    color: var(--text-primary);
}



body[data-page="rental-applications"] .count-badge-green {

    background: var(--ios-system-green);
    color: var(--text-primary);
}



/* Card Description Truncation */
body[data-page="rental-applications"] .card-description {

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}



/* Card Divider */
body[data-page="rental-applications"] .card-divider {

    border-top: 1px solid var(--glass-border);
}



/* Copy Button Success State */
body[data-page="rental-applications"] .copy-success {

    background: var(--ios-system-green) !important;
    color: var(--text-primary) !important;
}



/* Toggle Animation */
body[data-page="rental-applications"] .toggle-icon-expanded {

    transform: rotate(90deg);
}



body[data-page="rental-applications"] .toggle-icon-collapsed {

    transform: rotate(0deg);
}



/* Form Field Checkboxes */
body[data-page="rental-applications"] input[type="checkbox"] {

    cursor: pointer;
    accent-color: var(--ios-system-orange);
}



body[data-page="rental-applications"] input[type="checkbox"]:hover {

    opacity: 0.8;
}



body[data-page="rental-applications"] label.cursor-pointer {

    transition: opacity 0.15s ease;
}



body[data-page="rental-applications"] label.cursor-pointer:hover {

    opacity: 0.9;
}



/* ============================================================
   COLLAPSIBLE FORM FIELD SECTIONS
   ============================================================ */

body[data-page="rental-applications"] .form-field-section {

    margin-bottom: 0.5em;
    border-radius: 0.5em;
    overflow: hidden;
    background: var(--glass-primary);
    transition: all 0.2s ease;
}



body[data-page="rental-applications"] .form-field-section-header {

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75em 1em;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}



body[data-page="rental-applications"] .form-field-section-header:hover {

    background: var(--glass-hover);
}



body[data-page="rental-applications"] .form-field-section-title {

    display: flex;
    align-items: center;
    gap: 0.5em;
    font-weight: 500;
}



body[data-page="rental-applications"] .form-field-section-chevron {

    width: 1.25em;
    height: 1.25em;
    transition: transform 0.2s ease;
    color: var(--text-secondary);
}



body[data-page="rental-applications"] .form-field-section-chevron.expanded {

    transform: rotate(180deg);
}



body[data-page="rental-applications"] .form-field-section-content {

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1em;
}



body[data-page="rental-applications"] .form-field-section-content.expanded {

    max-height: 50em; /* Generous max height for content */
    padding: 0 1em 1em 1em;
}



body[data-page="rental-applications"] .form-field-section-fields {

    display: flex;
    flex-direction: column;
    gap: 0.5em;
    padding-top: 0.5em;
}



/* ============================================================
   CUSTOM QUESTIONS BUILDER
   ============================================================ */

body[data-page="rental-applications"] .custom-questions-container {

    display: flex;
    flex-direction: column;
    gap: 0.75em;
}



body[data-page="rental-applications"] .custom-question-item {

    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    padding: 1em;
    position: relative;
    transition: all 0.2s ease;
}



body[data-page="rental-applications"] .custom-question-item:hover {

    background: var(--glass-secondary);
    border-color: #f97316;
}



body[data-page="rental-applications"] .custom-question-header {

    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75em;
}



body[data-page="rental-applications"] .custom-question-number {

    font-weight: 600;
    color: var(--ios-system-orange);
    font-size: 0.875em;
}



body[data-page="rental-applications"] .custom-question-delete {

    width: 2em;
    height: 2em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375em;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--ios-system-red);
    cursor: pointer;
    transition: all 0.15s ease;
}



body[data-page="rental-applications"] .custom-question-delete:hover {

    background: var(--ios-system-red);
    color: var(--text-primary);
    border-color: var(--ios-system-red);
}



body[data-page="rental-applications"] .custom-question-fields {

    display: flex;
    flex-direction: column;
    gap: 0.75em;
}



body[data-page="rental-applications"] .custom-question-field {

    display: flex;
    flex-direction: column;
    gap: 0.25em;
}



body[data-page="rental-applications"] .custom-question-field label {

    font-size: 0.875em;
    font-weight: 500;
    color: var(--text-primary);
}



body[data-page="rental-applications"] .custom-question-field input,
body[data-page="rental-applications"] .custom-question-field select,
body[data-page="rental-applications"] .custom-question-field textarea {

    width: 100%;
    padding: 0.625em 0.875em;
    border: 1px solid var(--glass-border);
    border-radius: 0.375em;
    background: var(--glass-primary);
    color: var(--text-primary);
    font-family: 'Noto Sans JP', 'Noto Sans KR', sans-serif;
    font-size: 0.875em;
    transition: all 0.15s ease;
}



body[data-page="rental-applications"] .custom-question-field input:focus,
body[data-page="rental-applications"] .custom-question-field select:focus,
body[data-page="rental-applications"] .custom-question-field textarea:focus {

    outline: none;
    border-color: #f97316;
    background: var(--glass-secondary);
}



body[data-page="rental-applications"] .custom-question-field textarea {

    resize: vertical;
    min-height: 2.5em;
}



/* Question Type Specific Options */
body[data-page="rental-applications"] .question-options-container {

    background: var(--glass-secondary);
    border-radius: 0.375em;
    padding: 0.75em;
    margin-top: 0.5em;
}



body[data-page="rental-applications"] .question-option-item {

    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.5em;
}



body[data-page="rental-applications"] .question-option-item input {

    flex: 1;
}



body[data-page="rental-applications"] .question-option-remove {

    width: 1.75em;
    height: 1.75em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25em;
    background: transparent;
    border: none;
    color: var(--ios-system-red);
    cursor: pointer;
    transition: all 0.15s ease;
}



body[data-page="rental-applications"] .question-option-remove:hover {

    background: var(--ios-system-red);
    color: var(--text-primary);
}



body[data-page="rental-applications"] .add-question-option-btn {

    width: 100%;
    padding: 0.5em;
    background: var(--glass-primary);
    border: 1px dashed var(--glass-border);
    border-radius: 0.375em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    font-size: 0.875em;
}



body[data-page="rental-applications"] .add-question-option-btn:hover {

    background: var(--glass-hover);
    border-color: #f97316;
    color: var(--ios-system-orange);
}



/* Add Custom Question Button */
body[data-page="rental-applications"] .add-custom-question-btn {

    width: 100%;
    padding: 0.875em;
    background: var(--glass-primary);
    border: 2px dashed var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625em;
    font-weight: 500;
}



body[data-page="rental-applications"] .add-custom-question-btn:hover:not(:disabled) {

    background: var(--glass-hover);
    border-color: #f97316;
    color: var(--ios-system-orange);
}



body[data-page="rental-applications"] .add-custom-question-btn:disabled {

    opacity: 0.5;
    cursor: not-allowed;
}



body[data-page="rental-applications"] .custom-questions-limit-notice {

    font-size: 0.75em;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 0.5em;
}



/* Question Type Icons */
body[data-page="rental-applications"] .question-type-icon {

    width: 1em;
    height: 1em;
    opacity: 0.7;
}



/* ===================================
   Applications Table - Spacious & Readable
   =================================== */

/* Table card container - compact */
body[data-page="rental-applications"] #applicationsTable {
    padding: 1em !important;
    border-radius: 1em;
}

/* Table Container with Scrolling */
body[data-page="rental-applications"] .applications-table-wrapper {
    max-height: 36em;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 0.75em;
}

/* Table Base Styling */
body[data-page="rental-applications"] .applications-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Sticky Table Header - more prominent */
body[data-page="rental-applications"] .applications-table thead {
    position: sticky;
    top: 0;
    background: var(--glass-secondary);
    backdrop-filter: blur(24px);
    z-index: 10;
    font-weight: 600;
}

body[data-page="rental-applications"] .applications-table thead tr {
    border-bottom: 2px solid var(--glass-border);
}

body[data-page="rental-applications"] .applications-table th {
    text-align: left;
    padding: 0.875em 0.75em;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* Table Body Rows - more breathing room */
body[data-page="rental-applications"] .applications-table tbody tr {
    transition: all 0.25s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Alternating row backgrounds for better readability */
body[data-page="rental-applications"] .applications-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

body[data-page="rental-applications"] .applications-table tbody tr:hover {
    /* Refined glow effect */
    background: rgba(255, 255, 255, 0.04);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 1.5em rgba(255, 94, 58, 0.2),
        0 0 3em rgba(255, 179, 71, 0.1);
    transform: scale(1.002);
}

body[data-page="rental-applications"] .applications-table td {
    padding: 0.875em 0.75em;
    color: var(--text-primary);
    font-size: 0.9em;
    vertical-align: middle;
}

/* Dark theme explicit override for table cells */
body[data-page="rental-applications"] [data-theme="dark"] .applications-table td,
body[data-page="rental-applications"] [data-theme="darkart"] .applications-table td,
body[data-page="rental-applications"] [data-theme="darkmodern"] .applications-table td {
    color: var(--text-primary);
}

/* Narrow columns for rating, household, pets */
body[data-page="rental-applications"] .applications-table th.col-narrow,
body[data-page="rental-applications"] .applications-table td.col-narrow {
    width: 3.5em;
    text-align: center;
    padding-left: 0.5em;
    padding-right: 0.5em;
}

/* Email column - allow truncation */
body[data-page="rental-applications"] .applications-table td:nth-child(2) {
    max-width: 14em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Actions column - more space */
body[data-page="rental-applications"] .applications-table td:last-child {
    min-width: 7em;
}

/* Action buttons in table */
body[data-page="rental-applications"] .applications-table .glass-button {
    padding: 0.625em 1em;
    font-size: 0.85em;
    border-radius: 0.5em;
}



/* Editable Select Dropdowns in Table */
body[data-page="rental-applications"] .editable-status,
body[data-page="rental-applications"] .editable-rating {

    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: var(--ios-caption1);
    font-family: var(--font-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}



body[data-page="rental-applications"] .editable-status:hover,
body[data-page="rental-applications"] .editable-rating:hover {

    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 94, 58, 0.3);
}



body[data-page="rental-applications"] .editable-status:focus,
body[data-page="rental-applications"] .editable-rating:focus {

    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 94, 58, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 94, 58, 0.1);
}



/* ===================================
   Viewing Slots Modal - Spacious & Elegant
   =================================== */

body[data-page="rental-applications"] .viewing-slots-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-backdrop);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

body[data-page="rental-applications"] .viewing-slots-modal.hidden {
    display: none;
}

body[data-page="rental-applications"] .viewing-slots-modal-content {
    background: var(--glass-primary);
    backdrop-filter: blur(32px);
    border-radius: 1.5em;
    border: 1px solid var(--glass-border);
    padding: 2.5em;
    max-width: 52em;
    width: calc(100% - 3em);
    margin: 1.5em;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow:
        0 2em 4em rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-1em) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal header */
body[data-page="rental-applications"] .viewing-slots-modal-content > .flex-between {
    margin-bottom: 2em !important;
    padding-bottom: 1.5em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="rental-applications"] .viewing-slots-modal-content .heading-2 {
    font-size: 1.5em;
    font-weight: 600;
}

body[data-page="rental-applications"] .modal-close-btn {
    width: 2.75em;
    height: 2.75em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    border-radius: 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
}

body[data-page="rental-applications"] .modal-close-btn:hover {
    background: var(--ios-system-red);
    border-color: var(--ios-system-red);
    color: var(--button-text-on-color);
    transform: scale(1.05);
}

/* Viewing slots list section */
body[data-page="rental-applications"] .viewing-slots-modal-content > .mb-6 {
    margin-bottom: 2em !important;
}

body[data-page="rental-applications"] .viewing-slots-modal-content .form-label {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 1em !important;
}

body[data-page="rental-applications"] .viewing-slots-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="rental-applications"] .viewing-slot-item {
    background: var(--glass-secondary);
    padding: 1.25em 1.5em;
    border-radius: 1em;
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5em;
    transition: all 0.25s ease;
}

body[data-page="rental-applications"] .viewing-slot-item:hover {
    background: var(--glass-hover);
    border-color: var(--ios-system-orange);
    transform: translateX(0.25em);
}

body[data-page="rental-applications"] .viewing-slot-info {
    flex: 1;
}

body[data-page="rental-applications"] .viewing-slot-datetime {
    font-size: 1.05em;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.375em;
}

body[data-page="rental-applications"] .viewing-slot-notes {
    font-size: 0.9em;
    color: var(--text-secondary);
    line-height: 1.4;
}

body[data-page="rental-applications"] .viewing-slot-actions {
    display: flex;
    gap: 0.75em;
}

body[data-page="rental-applications"] .delete-slot-btn {
    color: var(--ios-system-red);
    padding: 0.625em 1.25em;
    font-size: 0.9em;
    border-radius: 0.625em;
    transition: all 0.2s ease;
}

body[data-page="rental-applications"] .delete-slot-btn:hover {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
}

/* Add new slot form section */
body[data-page="rental-applications"] .viewing-slots-modal-content > .glass-container-thin {
    padding: 2em !important;
    border-radius: 1.25em;
    border: 1px solid var(--glass-border);
}

body[data-page="rental-applications"] #addViewingSlotForm {
    gap: 1.25em !important;
}

body[data-page="rental-applications"] #addViewingSlotForm .flex.gap-4 {
    gap: 1.5em !important;
}

body[data-page="rental-applications"] #addViewingSlotForm .caption {
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 0.5em !important;
}

body[data-page="rental-applications"] #addViewingSlotForm input {
    padding: 0.875em 1.25em !important;
    font-size: 1em;
    border-radius: 0.75em;
}

body[data-page="rental-applications"] #addViewingSlotForm button[type="submit"] {
    padding: 1em 2em !important;
    font-size: 1em;
    font-weight: 600;
    margin-top: 0.5em !important;
    border-radius: 0.875em;
}



/* ===================================
   RENTAL APPLICATION DETAILS PAGE
   data-page="rental-application-details"
   =================================== */

/* scope shorthand */
body[data-page="rental-application-details"] .container { max-width:none !important; width:100% !important; padding:1.5em 1em !important; }

/* --- HEADER --- */
body[data-page="rental-application-details"] .rd-header { border-radius:1.25em; }
body[data-page="rental-application-details"] .rd-header-top { display:flex; justify-content:space-between; align-items:flex-start; gap:1.5em; margin-bottom:1.5em; }
body[data-page="rental-application-details"] .rd-header-info { flex:1; min-width:0; }
body[data-page="rental-application-details"] .rd-header-actions { display:flex; gap:0.75em; flex-shrink:0; }
body[data-page="rental-application-details"] .rd-back-btn { display:inline-flex; align-items:center; gap:0.5em; padding:0.5em 0.875em; margin-bottom:0.75em; background:var(--glass-secondary); border:1px solid var(--glass-border); border-radius:0.5em; color:var(--text-secondary); font-size:0.8em; font-weight:500; cursor:pointer; transition:all 0.2s ease; letter-spacing:0.02em; text-transform:uppercase; }
body[data-page="rental-application-details"] .rd-back-btn::before { content:"\2190"; font-size:1.1em; transition:transform 0.2s ease; }
body[data-page="rental-application-details"] .rd-back-btn:hover { background:var(--glass-hover); border-color:var(--accent-primary); color:var(--text-primary); transform:translateX(-2px); }
body[data-page="rental-application-details"] .rd-back-btn:hover::before { transform:translateX(-2px); }
body[data-page="rental-application-details"] .rental-btn-primary { background:var(--accent-primary); color:var(--button-text-on-color); }
body[data-page="rental-application-details"] .rental-btn-primary:hover { opacity:0.9; }

/* --- STATS ROW --- */
body[data-page="rental-application-details"] .rd-stats-row { display:grid; grid-template-columns:repeat(6,1fr); gap:0.75em; }
body[data-page="rental-application-details"] .rd-stat-card { display:flex; flex-direction:column; gap:0.2em; padding:0.875em 1em; background:var(--glass-secondary); border:1px solid var(--glass-border); border-radius:0.75em; transition:all 0.2s ease; position:relative; overflow:hidden; }
body[data-page="rental-application-details"] .rd-stat-card::before { content:""; position:absolute; top:0; left:0; width:3px; height:100%; border-radius:3px 0 0 3px; background:var(--text-quaternary); }
body[data-page="rental-application-details"] .rd-stat-card:hover { background:var(--glass-hover); transform:translateY(-1px); }
body[data-page="rental-application-details"] .rd-stat-label { text-transform:uppercase; letter-spacing:0.05em; font-weight:500; }
body[data-page="rental-application-details"] .rd-stat-value { font-weight:700; line-height:1.1; }
body[data-page="rental-application-details"] .rd-stat-shortlist::before { background:var(--ios-system-blue); }
body[data-page="rental-application-details"] .rd-stat-accepted::before { background:var(--accent-success); }
body[data-page="rental-application-details"] .rd-stat-rating::before { background:var(--accent-primary); }
body[data-page="rental-application-details"] .rd-stat-pets::before { background:var(--ios-system-purple); }
body[data-page="rental-application-details"] .rd-stat-conversion::before { background:var(--accent-warning); }

/* --- VIEW CONTROLS --- */
body[data-page="rental-application-details"] .rd-controls { display:flex; gap:0.75em; align-items:center; flex-wrap:wrap; }
body[data-page="rental-application-details"] .rd-view-toggle { display:flex; padding:0.25em; border-radius:0.625em; gap:0.125em; flex-shrink:0; }
body[data-page="rental-application-details"] .rd-toggle-btn { padding:0.5em 1em; border:none; background:transparent; color:var(--text-tertiary); font-size:0.85em; font-weight:600; cursor:pointer; border-radius:0.5em; transition:all 0.2s ease; letter-spacing:0.02em; }
body[data-page="rental-application-details"] .rd-toggle-btn:hover { color:var(--text-primary); }
body[data-page="rental-application-details"] .rd-toggle-active { background:var(--accent-primary); color:var(--button-text-on-color); }
body[data-page="rental-application-details"] .rd-toggle-active:hover { color:var(--button-text-on-color); }
body[data-page="rental-application-details"] .rd-filters-inline { display:flex; gap:0.5em; flex:1; align-items:center; flex-wrap:wrap; }
body[data-page="rental-application-details"] .rd-filter-select { min-width:8em; font-size:0.85em; background:var(--glass-secondary); border:1px solid var(--glass-border); transition:all 0.2s ease; }
body[data-page="rental-application-details"] .rd-filter-select:focus { outline:none; border-color:var(--accent-primary); box-shadow:0 0 0 2px rgba(255,149,0,0.15); }
body[data-page="rental-application-details"] .rd-search-input { min-width:8em; flex:1; font-size:0.85em; }
body[data-page="rental-application-details"] .rd-reset-btn { font-size:0.8em; text-transform:uppercase; letter-spacing:0.03em; }
body[data-page="rental-application-details"] .rd-advanced-filters { border-radius:0.75em; }
body[data-page="rental-application-details"] .rd-filter-row { display:flex; flex-wrap:wrap; gap:0.75em; align-items:flex-end; }
body[data-page="rental-application-details"] .rd-filter-group { display:flex; flex-direction:column; gap:0.25em; }
body[data-page="rental-application-details"] .rd-filter-label { text-transform:uppercase; letter-spacing:0.04em; font-weight:500; font-size:0.7em; }
body[data-page="rental-application-details"] .rd-filter-separator { display:flex; align-items:center; padding:0 0.125em; }
body[data-page="rental-application-details"] .rd-filter-input-md { width:5.5em; font-size:0.85em; }
body[data-page="rental-application-details"] .rd-filter-input-sm { width:3.5em; font-size:0.85em; }

/* --- APPLICANT CARDS --- */
body[data-page="rental-application-details"] .rd-cards-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(22em, 1fr)); gap:1em; }
body[data-page="rental-application-details"] .rd-cards-empty { grid-column:1/-1; min-height:12em; color:var(--text-secondary); font-size:1em; }
body[data-page="rental-application-details"] .rd-applicant-card { padding:1.25em; border-radius:1em; cursor:pointer; transition:all 0.25s ease; display:flex; flex-direction:column; gap:0.875em; position:relative; }
body[data-page="rental-application-details"] .rd-applicant-card:hover { transform:translateY(-2px); box-shadow:0 0.5em 2em rgba(0,0,0,0.12); }
body[data-page="rental-application-details"] .rd-card-selected { outline:2px solid var(--accent-primary); outline-offset:2px; }

/* Card header */
body[data-page="rental-application-details"] .rd-card-header { display:flex; align-items:center; gap:0.75em; }
body[data-page="rental-application-details"] .rd-card-avatar { width:2.75em; height:2.75em; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:1em; color:white; flex-shrink:0; letter-spacing:0.02em; }
body[data-page="rental-application-details"] .rd-card-name-block { flex:1; min-width:0; }
body[data-page="rental-application-details"] .rd-card-name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body[data-page="rental-application-details"] .rd-card-sub { margin-top:0.125em; }
body[data-page="rental-application-details"] .rd-status-badge { padding:0.25em 0.625em; border-radius:1em; font-size:0.7em; font-weight:600; text-transform:uppercase; letter-spacing:0.04em; white-space:nowrap; flex-shrink:0; }
body[data-page="rental-application-details"] .rd-status-new { background:var(--glass-secondary); color:var(--text-secondary); }
body[data-page="rental-application-details"] .rd-status-review { background:rgba(0,122,255,0.15); color:var(--ios-system-blue); }
body[data-page="rental-application-details"] .rd-status-shortlist { background:rgba(255,149,0,0.15); color:var(--accent-primary); }
body[data-page="rental-application-details"] .rd-status-accepted { background:rgba(52,199,89,0.15); color:var(--accent-success); }
body[data-page="rental-application-details"] .rd-status-rejected { background:rgba(255,59,48,0.15); color:var(--accent-danger); }

/* Card metrics */
body[data-page="rental-application-details"] .rd-card-metrics { display:grid; grid-template-columns:1fr 1fr; gap:0.5em 1em; padding:0.75em 0; border-top:1px solid var(--glass-border); border-bottom:1px solid var(--glass-border); }
body[data-page="rental-application-details"] .rd-card-metric { display:flex; flex-direction:column; gap:0.1em; }
body[data-page="rental-application-details"] .rd-metric-label { font-size:0.65em; text-transform:uppercase; letter-spacing:0.05em; }
body[data-page="rental-application-details"] .rd-metric-value { font-weight:600; }

/* Card flags */
body[data-page="rental-application-details"] .rd-card-flags { display:flex; gap:0.375em; flex-wrap:wrap; }
body[data-page="rental-application-details"] .rd-flag { padding:0.2em 0.5em; border-radius:0.375em; font-size:0.65em; font-weight:600; text-transform:uppercase; letter-spacing:0.03em; }
body[data-page="rental-application-details"] .rd-flag-active { background:rgba(255,149,0,0.15); color:var(--accent-primary); }
body[data-page="rental-application-details"] .rd-flag-inactive { background:var(--glass-secondary); color:var(--text-quaternary); }

/* Card footer */
body[data-page="rental-application-details"] .rd-card-footer { display:flex; justify-content:space-between; align-items:center; }
body[data-page="rental-application-details"] .rd-card-contact { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; min-width:0; }
body[data-page="rental-application-details"] .rd-card-actions { display:flex; gap:0.5em; align-items:center; flex-shrink:0; }

/* Card rating stars */
body[data-page="rental-application-details"] .rd-card-rating { display:flex; gap:0.125em; }
body[data-page="rental-application-details"] .rd-star { background:none; border:none; font-size:1.25em; cursor:pointer; color:var(--text-quaternary); transition:all 0.15s ease; padding:0; line-height:1; }
body[data-page="rental-application-details"] .rd-star:hover { transform:scale(1.2); color:var(--accent-primary); }
body[data-page="rental-application-details"] .rd-star-filled { color:var(--accent-primary); }

/* Compare checkbox */
body[data-page="rental-application-details"] .rd-compare-check { width:1.125em; height:1.125em; cursor:pointer; accent-color:var(--accent-primary); }

/* --- TABLE VIEW --- */
body[data-page="rental-application-details"] .rd-table-card { border-radius:1em; overflow:hidden; }
body[data-page="rental-application-details"] .rd-table-wrapper { overflow-x:auto; }
body[data-page="rental-application-details"] .rd-table { width:100%; border-collapse:collapse; }
body[data-page="rental-application-details"] .rd-table th { text-align:left; padding:0.75em 0.625em; font-size:0.75em; text-transform:uppercase; letter-spacing:0.04em; color:var(--text-tertiary); font-weight:600; border-bottom:1px solid var(--glass-border); white-space:nowrap; }
body[data-page="rental-application-details"] .rd-table td { padding:0.75em 0.625em; border-bottom:1px solid var(--glass-border); vertical-align:middle; }
body[data-page="rental-application-details"] .rd-table-row { cursor:pointer; transition:background 0.15s ease; }
body[data-page="rental-application-details"] .rd-table-row:hover { background:var(--glass-hover); }
body[data-page="rental-application-details"] .rd-th-check { width:2.5em; }
body[data-page="rental-application-details"] .rd-td-check { width:2.5em; }
body[data-page="rental-application-details"] .rd-th-name { min-width:10em; }
body[data-page="rental-application-details"] .rd-td-name { font-weight:600; }
body[data-page="rental-application-details"] .rd-th-contact { min-width:14em; }
body[data-page="rental-application-details"] .rd-td-contact { max-width:16em; }
body[data-page="rental-application-details"] .rd-td-rating { white-space:nowrap; }
body[data-page="rental-application-details"] .rd-star-sm { font-size:0.875em; cursor:pointer; color:var(--text-quaternary); transition:color 0.15s ease; }
body[data-page="rental-application-details"] .rd-star-sm:hover { color:var(--accent-primary); }
body[data-page="rental-application-details"] .rd-star-sm.rd-star-filled { color:var(--accent-primary); }
body[data-page="rental-application-details"] .rd-status-select { font-size:0.8em; border-left:3px solid var(--text-tertiary); }
body[data-page="rental-application-details"] .rd-status-select.rd-status-review { border-left-color:var(--ios-system-blue); }
body[data-page="rental-application-details"] .rd-status-select.rd-status-shortlist { border-left-color:var(--accent-primary); }
body[data-page="rental-application-details"] .rd-status-select.rd-status-accepted { border-left-color:var(--accent-success); }
body[data-page="rental-application-details"] .rd-status-select.rd-status-rejected { border-left-color:var(--accent-danger); }
body[data-page="rental-application-details"] .rd-td-flags { display:flex; gap:0.25em; flex-wrap:wrap; }
body[data-page="rental-application-details"] .rd-flag-mini { padding:0.15em 0.375em; border-radius:0.25em; font-size:0.65em; font-weight:600; background:rgba(255,149,0,0.12); color:var(--accent-primary); text-transform:uppercase; }

/* --- COMPARISON BAR --- */
body[data-page="rental-application-details"] .rd-comparison-bar { position:sticky; bottom:0; z-index:var(--z-sticky); border-radius:1em 1em 0 0; padding:0.75em 1.25em; margin-bottom:0; }
body[data-page="rental-application-details"] .rd-comparison-bar-inner { display:flex; align-items:center; gap:0.75em; justify-content:center; }

/* --- COMPARISON PANEL --- */
body[data-page="rental-application-details"] .rd-comparison-panel { border-radius:1.25em; padding:1.5em; margin-bottom:1.5em; }
body[data-page="rental-application-details"] .rd-comparison-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:1.25em; padding-bottom:0.75em; border-bottom:1px solid var(--glass-border); }
body[data-page="rental-application-details"] .rd-comparison-grid { display:grid; gap:0; }
body[data-page="rental-application-details"] .rd-comp-label { padding:0.5em 0.75em; font-weight:600; text-transform:uppercase; letter-spacing:0.04em; background:var(--glass-secondary); border-bottom:1px solid var(--glass-border); position:sticky; left:0; }
body[data-page="rental-application-details"] .rd-comp-value { padding:0.5em 0.75em; border-bottom:1px solid var(--glass-border); }
body[data-page="rental-application-details"] .rd-comp-value:nth-child(odd) { background:var(--glass-secondary); }

/* --- ANALYTICS --- */
body[data-page="rental-application-details"] #analyticsSection { width:100%; max-width:none; }
body[data-page="rental-application-details"] .rd-analytics-grid { display:grid; gap:1em; width:100%; }
body[data-page="rental-application-details"] .rd-chart-card { display:flex; flex-direction:column; padding:1.25em; border-radius:1em; transition:box-shadow 0.25s ease; }
body[data-page="rental-application-details"] .rd-chart-card:hover { box-shadow:0 0.25em 1.5em rgba(0,0,0,0.08); }
body[data-page="rental-application-details"] .rd-chart-card canvas { flex:1; width:100% !important; height:100% !important; }
body[data-page="rental-application-details"] .rd-chart-compact { min-height:14em; }
body[data-page="rental-application-details"] .rd-chart-sm { min-height:16em; }
body[data-page="rental-application-details"] .rd-chart-md { min-height:20em; }
body[data-page="rental-application-details"] .rd-chart-lg { min-height:24em; }
body[data-page="rental-application-details"] .rd-chart-xl { min-height:22em; }
body[data-page="rental-application-details"] .rd-chart-container-compact { width:100%; height:100%; min-height:10em; }
body[data-page="rental-application-details"] .rd-mini-charts-row { display:grid; grid-template-columns:repeat(5,1fr); gap:1em; }
@media (max-width:75em) { body[data-page="rental-application-details"] .rd-mini-charts-row { grid-template-columns:repeat(3,1fr); } }
@media (max-width:48em) { body[data-page="rental-application-details"] .rd-mini-charts-row { grid-template-columns:repeat(2,1fr); } }
body[data-page="rental-application-details"] .rd-chart-container-tall { width:100%; height:100%; min-height:22em; }
body[data-page="rental-application-details"] .rd-chart-container-md { width:100%; height:100%; min-height:16em; }
body[data-page="rental-application-details"] .rd-chart-empty { height:100%; min-height:10em; }
body[data-page="rental-application-details"] #householdD3Chart { width:100%; height:100%; min-height:10em; }
body[data-page="rental-application-details"] #householdD3Chart svg { overflow:visible; }
body[data-page="rental-application-details"] .rd-map-min-height { min-height:16em; }
body[data-page="rental-application-details"] .rd-map-popup { font-family:var(--font-sans); min-width:10em; }
body[data-page="rental-application-details"] .rd-map-popup-details { margin-top:0.375em; font-size:0.8em; color:var(--text-secondary); }

/* --- EXPANDABLE CHARTS --- */
body[data-page="rental-application-details"] .rd-expandable { cursor:zoom-in; position:relative; }
body[data-page="rental-application-details"] .rd-expandable::after { content:"\2922"; position:absolute; top:0.75em; right:0.75em; font-size:1.125em; color:var(--text-quaternary); transition:all 0.2s ease; pointer-events:none; }
body[data-page="rental-application-details"] .rd-expandable:hover::after { color:var(--accent-primary); transform:scale(1.2); }

/* Chart expand modal */
body[data-page="rental-application-details"] .rd-chart-modal { position:fixed; inset:0; z-index:var(--z-modal); display:flex; align-items:center; justify-content:center; }
body[data-page="rental-application-details"] .rd-chart-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,0.6); backdrop-filter:blur(4px); }
body[data-page="rental-application-details"] .rd-chart-modal-content { position:relative; width:90vw; max-width:70em; max-height:85vh; display:flex; flex-direction:column; border-radius:1.25em; padding:1.5em; overflow:hidden; }
body[data-page="rental-application-details"] .rd-chart-modal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:1em; flex-shrink:0; }
body[data-page="rental-application-details"] .rd-chart-modal-body { flex:1; overflow:auto; min-height:0; }
body[data-page="rental-application-details"] .rd-chart-expanded-inner { width:100%; min-height:28em; display:flex; flex-direction:column; }
body[data-page="rental-application-details"] .rd-chart-expanded-inner canvas { width:100% !important; height:100% !important; flex:1; }
body[data-page="rental-application-details"] .rd-chart-expanded-inner svg { width:100%; height:auto; }
body.rd-modal-open { overflow:hidden; }

/* row-span-2 for scatter (was 3, now 2 since status moved down) */
body[data-page="rental-application-details"] .rd-row-span-2 { grid-row:span 2; }

/* --- RESPONSIVE --- */
@media (max-width: 48em) {
    body[data-page="rental-application-details"] .rd-stats-row { grid-template-columns:repeat(2,1fr); }
    body[data-page="rental-application-details"] .rd-header-top { flex-direction:column; }
    body[data-page="rental-application-details"] .rd-header-actions { width:100%; }
    body[data-page="rental-application-details"] .rd-header-actions .glass-button { flex:1; }
    body[data-page="rental-application-details"] .rd-controls { flex-direction:column; align-items:stretch; }
    body[data-page="rental-application-details"] .rd-cards-grid { grid-template-columns:1fr; }
    body[data-page="rental-application-details"] .rd-analytics-grid { grid-template-columns:1fr; gap:0.75em; }
    body[data-page="rental-application-details"] .rd-analytics-grid > * { grid-column:span 1 !important; grid-row:span 1 !important; }
    body[data-page="rental-application-details"] .rd-filter-row { flex-direction:column; }
    body[data-page="rental-application-details"] .rd-comparison-panel { padding:1em; }
}

@media (min-width: 48.0625em) and (max-width: 75em) {
    body[data-page="rental-application-details"] .rd-stats-row { grid-template-columns:repeat(3,1fr); }
    body[data-page="rental-application-details"] .rd-analytics-grid { grid-template-columns:repeat(6,1fr); gap:1em; }
    body[data-page="rental-application-details"] .rd-span-6-tablet { grid-column:span 6; }
}

@media (min-width: 75.0625em) {
    body[data-page="rental-application-details"] .rd-analytics-grid { grid-template-columns:repeat(12,1fr); gap:1.25em; }
    body[data-page="rental-application-details"] .rd-span-3 { grid-column:span 3; }
    body[data-page="rental-application-details"] .rd-span-4 { grid-column:span 4; }
    body[data-page="rental-application-details"] .rd-span-5 { grid-column:span 5; }
    body[data-page="rental-application-details"] .rd-span-6 { grid-column:span 6; }
    body[data-page="rental-application-details"] .rd-span-7 { grid-column:span 7; }
    body[data-page="rental-application-details"] .rd-span-8 { grid-column:span 8; }
    body[data-page="rental-application-details"] .rd-span-12 { grid-column:span 12; }
    body[data-page="rental-application-details"] .rd-row-span-2 { grid-row:span 2; }
    body[data-page="rental-application-details"] .rd-row-span-3 { grid-row:span 3; }
}

/* =============================================================
   RENTAL APPLICATION PROFILE — Star Rating
   Extracted from rental-application-profile.html
   ============================================================= */

body[data-page="rental-applications"] .star-btn {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.3;
    padding: 0;
}

body[data-page="rental-applications"] .star-btn:hover {
    transform: scale(1.3);
}

/* =============================================================
   RENTAL APPLICATION PROFILE — Responsive overrides
   ============================================================= */

@media (max-width: 68em) {
    body[data-page="rental-applications"] .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}



/**
 * Mietzinsrechner (Rent Calculator) - Page-Specific Styles
 *
 * Purpose: Styling for the Swiss rent calculator tool
 * Dependencies: coeus-master.css (COEUS design system)
 * Design System: Uses COEUS utilities, glass effects, and theme variables
 */

/* ----------------------------------------------------------------------------
   Calculator Steps Layout
   ---------------------------------------------------------------------------- */

body[data-page="mietzinsrechner"] .calculator-step {
    animation: fadeIn 0.3s ease-in-out;
}

body[data-page="mietzinsrechner"] .calculator-step.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------------------------------------------------
   Form Elements Specific to Calculator
   ---------------------------------------------------------------------------- */

/* Select dropdowns */
body[data-page="mietzinsrechner"] select {
    appearance: none;
    background-color: transparent;
    cursor: pointer;
}

/* Radio buttons */
body[data-page="mietzinsrechner"] input[type="radio"].form-radio {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

body[data-page="mietzinsrechner"] input[type="radio"].form-radio:checked {
    border-color: #f97316;
    background-color: var(--ios-system-orange);
}

body[data-page="mietzinsrechner"] input[type="radio"].form-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--text-primary);
}

body[data-page="mietzinsrechner"] input[type="radio"].form-radio:hover:not(:disabled) {
    border-color: #f97316;
    opacity: 0.8;
}

body[data-page="mietzinsrechner"] input[type="radio"].form-radio:focus {
    outline: 2px solid var(--ios-system-orange);
    outline-offset: 2px;
}

/* Number inputs - hide spin buttons */
body[data-page="mietzinsrechner"] input[type="number"].glass-container-thin::-webkit-inner-spin-button,
body[data-page="mietzinsrechner"] input[type="number"].glass-container-thin::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

body[data-page="mietzinsrechner"] input[type="number"].glass-container-thin:focus,
body[data-page="mietzinsrechner"] input[type="date"]:focus {
    outline: 2px solid var(--ios-system-orange);
    outline-offset: 2px;
}

/* ----------------------------------------------------------------------------
   Button Styles with Icons
   ---------------------------------------------------------------------------- */

body[data-page="mietzinsrechner"] button.glass-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body[data-page="mietzinsrechner"] button.glass-button:active:not(:disabled) {
    transform: translateY(0);
}

body[data-page="mietzinsrechner"] button.glass-button svg {
    flex-shrink: 0;
}

/* ----------------------------------------------------------------------------
   Results Display
   ---------------------------------------------------------------------------- */

body[data-page="mietzinsrechner"] #resultAmount {
    font-size: 3rem;
    line-height: 1.2;
    font-weight: 600;
    background: linear-gradient(
        135deg,
        var(--text-primary) 0%,
        var(--ios-system-orange) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Calculation Details Rows */
body[data-page="mietzinsrechner"] .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="mietzinsrechner"] .detail-row:last-child {
    border-bottom: none;
}

body[data-page="mietzinsrechner"] .detail-row.highlight {
    padding: 1rem 0;
    border-top: 2px solid var(--glass-border);
    border-bottom: 2px solid var(--glass-border);
    margin-top: 0.5rem;
}

body[data-page="mietzinsrechner"] .divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem 0;
}

/* ----------------------------------------------------------------------------
   Reference Rate Info Box
   ---------------------------------------------------------------------------- */

body[data-page="mietzinsrechner"] #currentReferenceRate {
    color: var(--ios-system-orange);
    font-weight: 600;
}

/* ----------------------------------------------------------------------------
   Grid Layout Responsive Adjustments
   ---------------------------------------------------------------------------- */

body[data-page="mietzinsrechner"] .grid.grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

/* Tablet breakpoint */
@media (max-width: 48em) {
    body[data-page="mietzinsrechner"] .grid.grid-cols-2 {
        grid-template-columns: 1fr;
    }

    body[data-page="mietzinsrechner"] #resultAmount {
        font-size: 2.5rem;
    }
}

/* Mobile breakpoint */
@media (max-width: 30em) {
    body[data-page="mietzinsrechner"] #resultAmount {
        font-size: 2rem;
    }

    body[data-page="mietzinsrechner"] .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    body[data-page="mietzinsrechner"] .flex.gap-md {
        flex-direction: column;
    }

    body[data-page="mietzinsrechner"] .flex-1 {
        width: 100%;
    }
}

/* ----------------------------------------------------------------------------
   Loading States
   ---------------------------------------------------------------------------- */

body[data-page="mietzinsrechner"] .loading-spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--glass-border);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ----------------------------------------------------------------------------
   Toast Notifications (placeholder for future implementation)
   ---------------------------------------------------------------------------- */

body[data-page="mietzinsrechner"] .toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    background: var(--glass-primary);
    backdrop-filter: blur(24px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--glass-border);
    z-index: 9999;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body[data-page="mietzinsrechner"] .toast-notification.success {
    border-left: 4px solid var(--ios-system-green);
}

body[data-page="mietzinsrechner"] .toast-notification.error {
    border-left: 4px solid var(--ios-system-red);
}

body[data-page="mietzinsrechner"] .toast-notification.info {
    border-left: 4px solid var(--ios-system-orange);
}

/* ----------------------------------------------------------------------------
   Print Styles
   ---------------------------------------------------------------------------- */

@media print {
    body[data-page="mietzinsrechner"] .glass-button,
    body[data-page="mietzinsrechner"] button,
    body[data-page="mietzinsrechner"] .calculator-step:not(#resultsSection) {
        display: none !important;
    }

    body[data-page="mietzinsrechner"] #resultsSection {
        display: block !important;
    }
}

/* ----------------------------------------------------------------------------
   Accessibility Enhancements
   ---------------------------------------------------------------------------- */

/* Focus visible for keyboard navigation */
body[data-page="mietzinsrechner"] *:focus-visible {
    outline: 2px solid var(--ios-system-orange);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    body[data-page="mietzinsrechner"] *,
    body[data-page="mietzinsrechner"] *::before,
    body[data-page="mietzinsrechner"] *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body[data-page="mietzinsrechner"] .glass-container-thin,
    body[data-page="mietzinsrechner"] .glass-card,
    body[data-page="mietzinsrechner"] select,
    body[data-page="mietzinsrechner"] button {
        border-width: 2px;
    }
}

/* ----------------------------------------------------------------------------
   Field Feedback (Auto-Fill Status Messages)
   ---------------------------------------------------------------------------- */

body[data-page="mietzinsrechner"] .field-feedback {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    animation: slideIn 0.3s ease-out;
}

body[data-page="mietzinsrechner"] .field-feedback svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

body[data-page="mietzinsrechner"] .field-feedback.success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--ios-system-green);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

body[data-page="mietzinsrechner"] .field-feedback.warning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--ios-system-orange);
    border: 1px solid rgba(255, 149, 0, 0.2);
}

body[data-page="mietzinsrechner"] .field-feedback.error {
    background: rgba(255, 59, 48, 0.1);
    color: var(--ios-system-red);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

/* Input field states */
body[data-page="mietzinsrechner"] input.success {
    border-color: var(--ios-system-green);
}

body[data-page="mietzinsrechner"] input.warning {
    border-color: var(--ios-system-orange);
}

body[data-page="mietzinsrechner"] input.error {
    border-color: var(--ios-system-red);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/**
 * Policy Pages CSS - Editorial Legal Document Design
 *
 * A refined, sophisticated design for legal documents
 * - Privacy Policy, Cookie Policy, Terms of Service
 *
 * Design Direction: Editorial/Magazine aesthetic
 * - Elegant serif typography for headings
 * - Two-column layout with sticky navigation
 * - Subtle animations and visual hierarchy
 * - Professional, trustworthy appearance
 *
 * UPDATED: 2026-01-12
 */

/* ============================================ */
/*           CSS CUSTOM PROPERTIES             */
/* ============================================ */

body[data-page="policy"] {
    --policy-accent: var(--ios-system-orange);
    --policy-accent-muted: rgba(255, 149, 0, 0.12);
    --policy-section-gap: 3em;
    --policy-content-max: 52em;
    --policy-sidebar-width: 18em;
    --policy-reading-line-height: 1.75;
    /* Explicit text colors for readability */
    --policy-text-primary: #1a1a1a;
    --policy-text-secondary: #4a4a4a;
    --policy-text-tertiary: #6a6a6a;
    --policy-text-muted: #8a8a8a;
    --policy-bg-card: #f5f5f5;
    --policy-bg-notice: #f0f4f8;
    --policy-border: rgba(0, 0, 0, 0.1);
}

/* Dark theme overrides */
[data-theme="dark"] body[data-page="policy"] {
    --policy-text-primary: #f0f0f0;
    --policy-text-secondary: #c0c0c0;
    --policy-text-tertiary: #909090;
    --policy-text-muted: #707070;
    --policy-bg-card: #252528;
    --policy-bg-notice: #2a2a30;
    --policy-border: rgba(255, 255, 255, 0.1);
}

/* ============================================ */
/*           PAGE LAYOUT - SCROLL HANDLING     */
/* ============================================ */

/* Ensure policy pages can scroll properly */
html:has(body[data-page="policy"]),
body[data-page="policy"] {
    overflow-x: hidden;
    overflow-y: scroll;
    height: auto;
    /* Re-enable trackpad/touch scrolling (overrides fouc-prevention.css) */
    overscroll-behavior: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
}

body[data-page="policy"] .app-container {
    min-height: 100vh;
    height: auto;
    overflow-y: visible;
    overscroll-behavior: auto;
}

/* ============================================ */
/*      SIMPLE LAYOUT (without .policy-layout) */
/*      Used by terms-of-service.html          */
/* ============================================ */

/* Simple policy page without sidebar - center the content */
body[data-page="policy"] .glass-card.policy-content {
    max-width: 50em;
    margin: 0 auto;
}

/* Section spacing for simple layout */
body[data-page="policy"] .glass-card .policy-section {
    margin-bottom: 2em;
}

body[data-page="policy"] .glass-card .policy-section h2 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

body[data-page="policy"] .glass-card .policy-section h3 {
    margin-top: 1.2em;
    margin-bottom: 0.4em;
}

body[data-page="policy"] .glass-card .policy-section ul,
body[data-page="policy"] .glass-card .policy-section ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

body[data-page="policy"] .glass-card .policy-section li {
    margin-bottom: 0.5em;
}

/* Language toggle for simple layout */
body[data-page="policy"] .glass-card .language-toggle {
    position: sticky;
    top: 1em;
    z-index: 100;
    margin-bottom: 2em;
}

/* Last updated text */
body[data-page="policy"] .last-updated {
    font-style: italic;
    margin-bottom: 2em;
}

/* ============================================ */
/*           PAGE LAYOUT - TWO COLUMN          */
/* ============================================ */

body[data-page="policy"] .policy-layout {
    display: grid;
    grid-template-columns: var(--policy-sidebar-width) 1fr;
    gap: 3em;
    max-width: 80em;
    margin: 2em auto;
    padding: 2.5em;
    min-height: auto;
    /* SOLID readable background - no transparency issues */
    background: #fafafa;
    border-radius: 1.5em;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Theme-specific solid backgrounds for guaranteed readability */
[data-theme="light"] body[data-page="policy"] .policy-layout {
    background: #fafafa;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] body[data-page="policy"] .policy-layout {
    background: #1a1a1f;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.4);
}

/* ============================================ */
/*           STICKY SIDEBAR NAVIGATION         */
/* ============================================ */

body[data-page="policy"] .policy-sidebar {
    position: relative;
    padding-right: 1em;
}


/* Sidebar Header */
body[data-page="policy"] .sidebar-header {
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--policy-border);
}

body[data-page="policy"] .sidebar-logo {
    font-family: var(--font-logo, 'Bodoni Moda', serif);
    font-size: 1.5em;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--policy-text-primary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.25em;
}

body[data-page="policy"] .sidebar-document-type {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--policy-text-tertiary);
    font-weight: 500;
}

/* Language Toggle in Sidebar */
body[data-page="policy"] .language-toggle {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1.5em;
}

body[data-page="policy"] .language-toggle button {
    flex: 1;
    padding: 0.5em 0.75em;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--policy-bg-card);
    border: 1px solid var(--policy-border);
    border-radius: 0.5em;
    color: var(--policy-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-page="policy"] .language-toggle button:hover {
    background: var(--policy-bg-notice);
    color: var(--policy-text-primary);
}

body[data-page="policy"] .language-toggle button.active {
    background: var(--policy-accent);
    border-color: var(--policy-accent);
    color: var(--button-text-on-color);
}

/* Progress Indicator */
body[data-page="policy"] .reading-progress {
    height: 3px;
    background: var(--policy-border);
    border-radius: 2px;
    margin-bottom: 1.5em;
    overflow: hidden;
}

body[data-page="policy"] .reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--policy-accent), #5AC8FA);
    border-radius: 2px;
    transition: width 0.1s ease-out;
}

/* Table of Contents */
body[data-page="policy"] .toc-title {
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--policy-text-tertiary);
    margin-bottom: 1em;
    font-weight: 600;
}

body[data-page="policy"] .toc-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

body[data-page="policy"] .toc-nav li {
    margin-bottom: 0.25em;
}

body[data-page="policy"] .toc-nav a {
    display: flex;
    align-items: baseline;
    gap: 0.5em;
    padding: 0.4em 0.75em;
    font-size: 0.8em;
    color: var(--policy-text-secondary);
    text-decoration: none;
    border-radius: 0.35em;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    margin-left: -2px;
}

body[data-page="policy"] .toc-nav a:hover {
    background: var(--policy-bg-card);
    color: var(--policy-text-primary);
}

body[data-page="policy"] .toc-nav a.active {
    background: var(--policy-accent-muted);
    color: var(--policy-accent);
    border-left-color: var(--policy-accent);
    font-weight: 500;
}

body[data-page="policy"] .toc-nav .toc-number {
    font-variant-numeric: tabular-nums;
    color: var(--policy-text-muted);
    min-width: 1.5em;
}

/* ============================================ */
/*           MAIN CONTENT AREA                 */
/* ============================================ */

body[data-page="policy"] .policy-content {
    max-width: var(--policy-content-max);
}

/* Document Header */
body[data-page="policy"] .policy-header {
    margin-bottom: 3em;
    padding-bottom: 2em;
    border-bottom: 1px solid var(--policy-border);
}

body[data-page="policy"] .policy-title {
    font-family: var(--font-serif);
    font-size: clamp(2em, 5vw, 3em);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--policy-text-primary);
    margin: 0 0 0.5em 0;
}

body[data-page="policy"] .policy-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em;
    font-size: 0.85em;
}

body[data-page="policy"] .policy-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="policy"] .policy-meta-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75em;
    color: var(--policy-text-muted);
}

body[data-page="policy"] .policy-meta-value {
    color: var(--policy-text-secondary);
}

/* Jurisdiction Badges */
body[data-page="policy"] .jurisdiction-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-top: 1.5em;
}

body[data-page="policy"] .jurisdiction-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.35em 0.75em;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--policy-bg-card);
    border: 1px solid var(--policy-border);
    border-radius: 2em;
    color: var(--policy-text-secondary);
    font-weight: 500;
}

body[data-page="policy"] .jurisdiction-badge--eu {
    background: #e8eef8;
    border-color: #b8c8e8;
    color: #1a4080;
}

body[data-page="policy"] .jurisdiction-badge--ch {
    background: #fce8e8;
    border-color: #f0c0c0;
    color: #a02020;
}

body[data-page="policy"] .jurisdiction-badge--us {
    background: #e8e8f0;
    border-color: #c0c0d8;
    color: #3c3b6e;
}

body[data-page="policy"] .jurisdiction-badge--ai {
    background: #f0e8f8;
    border-color: #d0b8e8;
    color: #7030a0;
}

/* Dark theme adjustments for badges */
[data-theme="dark"] body[data-page="policy"] .jurisdiction-badge--eu {
    background: #1a2840;
    border-color: #304060;
    color: #90b0e0;
}

[data-theme="dark"] body[data-page="policy"] .jurisdiction-badge--ch {
    background: #401818;
    border-color: #603030;
    color: #e09090;
}

[data-theme="dark"] body[data-page="policy"] .jurisdiction-badge--us {
    background: #202030;
    border-color: #404060;
    color: #a0a0c0;
}

[data-theme="dark"] body[data-page="policy"] .jurisdiction-badge--ai {
    background: #301840;
    border-color: #503060;
    color: #c090e0;
}

/* ============================================ */
/*           POLICY SECTIONS                   */
/* ============================================ */

body[data-page="policy"] .policy-section {
    margin-bottom: var(--policy-section-gap);
    scroll-margin-top: 2em;
    opacity: 0;
    transform: translateY(1em);
    animation: policy-section-reveal 0.5s ease forwards;
}

@keyframes policy-section-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation delays */
body[data-page="policy"] .policy-section:nth-child(1) { animation-delay: 0.05s; }
body[data-page="policy"] .policy-section:nth-child(2) { animation-delay: 0.1s; }
body[data-page="policy"] .policy-section:nth-child(3) { animation-delay: 0.15s; }
body[data-page="policy"] .policy-section:nth-child(4) { animation-delay: 0.2s; }
body[data-page="policy"] .policy-section:nth-child(5) { animation-delay: 0.25s; }
body[data-page="policy"] .policy-section:nth-child(n+6) { animation-delay: 0.3s; }

/* Section Headers */
body[data-page="policy"] .section-header {
    display: flex;
    align-items: baseline;
    gap: 0.75em;
    margin-bottom: 1em;
    padding-bottom: 0.75em;
    border-bottom: 1px solid var(--policy-border);
}

body[data-page="policy"] .section-number {
    font-family: var(--font-serif);
    font-size: 0.9em;
    font-weight: 400;
    color: var(--policy-accent);
    min-width: 1.5em;
}

body[data-page="policy"] .section-title {
    font-family: var(--font-serif);
    font-size: 1.5em;
    font-weight: 400;
    color: var(--policy-text-primary);
    letter-spacing: -0.01em;
    margin: 0;
}

/* Subsection Headers */
body[data-page="policy"] .subsection-title {
    font-family: var(--font-sans);
    font-size: 1.1em;
    font-weight: 600;
    color: var(--policy-text-primary);
    margin: 1.5em 0 0.75em 0;
}

/* Body Text */
body[data-page="policy"] .policy-text {
    font-size: 1em;
    line-height: var(--policy-reading-line-height);
    color: var(--policy-text-secondary);
    margin-bottom: 1em;
}

body[data-page="policy"] .policy-text strong {
    color: var(--policy-text-primary);
    font-weight: 600;
}

body[data-page="policy"] .policy-text a {
    color: var(--policy-accent);
    text-decoration: underline;
    text-decoration-color: rgba(255, 149, 0, 0.4);
    text-underline-offset: 0.15em;
    transition: text-decoration-color 0.2s ease;
}

body[data-page="policy"] .policy-text a:hover {
    text-decoration-color: var(--policy-accent);
}

/* Lists */
body[data-page="policy"] .policy-list {
    margin: 0 0 1.25em 0;
    padding-left: 1.5em;
}

body[data-page="policy"] .policy-list li {
    margin-bottom: 0.5em;
    line-height: var(--policy-reading-line-height);
    color: var(--policy-text-secondary);
}

body[data-page="policy"] .policy-list li::marker {
    color: var(--policy-text-muted);
}

body[data-page="policy"] .policy-list li strong {
    color: var(--policy-text-primary);
}

/* ============================================ */
/*           NOTICE BOXES                      */
/* ============================================ */

body[data-page="policy"] .notice-box {
    position: relative;
    padding: 1.25em 1.5em;
    margin: 1.5em 0;
    background: #f0f4f8;
    border-radius: 0.75em;
    border-left: 3px solid var(--policy-accent);
}

body[data-page="policy"] .notice-box--info {
    background: #e8f0f8;
    border-left-color: var(--ios-system-orange);
}

body[data-page="policy"] .notice-box--warning {
    background: #fef4e8;
    border-left-color: #FF9500;
}

body[data-page="policy"] .notice-box--ai {
    background: #f4e8f8;
    border-left-color: #AF52DE;
}

body[data-page="policy"] .notice-box--success {
    background: #e8f8f0;
    border-left-color: #34C759;
}

/* Dark theme notice boxes */
[data-theme="dark"] body[data-page="policy"] .notice-box {
    background: #202428;
}

[data-theme="dark"] body[data-page="policy"] .notice-box--info {
    background: #182030;
}

[data-theme="dark"] body[data-page="policy"] .notice-box--warning {
    background: #302818;
}

[data-theme="dark"] body[data-page="policy"] .notice-box--ai {
    background: #281830;
}

[data-theme="dark"] body[data-page="policy"] .notice-box--success {
    background: #183020;
}

body[data-page="policy"] .notice-box-title {
    font-weight: 600;
    color: var(--policy-text-primary);
    margin-bottom: 0.5em;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body[data-page="policy"] .notice-box-text {
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--policy-text-secondary);
    margin: 0;
}

body[data-page="policy"] .notice-box-text strong {
    color: var(--policy-text-primary);
}

/* ============================================ */
/*           TABLES                            */
/* ============================================ */

body[data-page="policy"] .policy-table-wrapper {
    margin: 1.5em 0;
    overflow-x: auto;
    border-radius: 0.75em;
    border: 1px solid var(--policy-border);
    background: var(--policy-bg-card);
}

body[data-page="policy"] .policy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

body[data-page="policy"] .policy-table th {
    text-align: left;
    padding: 1em 1.25em;
    background: #eaeaea;
    color: var(--policy-text-primary);
    font-weight: 600;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--policy-border);
}

[data-theme="dark"] body[data-page="policy"] .policy-table th {
    background: #2a2a30;
}

body[data-page="policy"] .policy-table td {
    padding: 0.875em 1.25em;
    color: var(--policy-text-secondary);
    border-bottom: 1px solid var(--policy-border);
    vertical-align: top;
    line-height: 1.5;
}

body[data-page="policy"] .policy-table tr:last-child td {
    border-bottom: none;
}

body[data-page="policy"] .policy-table tr:hover td {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] body[data-page="policy"] .policy-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

body[data-page="policy"] .policy-table code {
    background: rgba(0, 0, 0, 0.06);
    padding: 0.15em 0.4em;
    border-radius: 0.25em;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.85em;
}

[data-theme="dark"] body[data-page="policy"] .policy-table code {
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================ */
/*           RIGHTS CARDS                      */
/* ============================================ */

body[data-page="policy"] .rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16em, 1fr));
    gap: 1em;
    margin: 1.5em 0;
}

body[data-page="policy"] .right-card {
    padding: 1.25em;
    background: var(--policy-bg-card);
    border: 1px solid var(--policy-border);
    border-radius: 0.75em;
    transition: all 0.2s ease;
}

body[data-page="policy"] .right-card:hover {
    background: #ececec;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] body[data-page="policy"] .right-card:hover {
    background: #2c2c32;
}

body[data-page="policy"] .right-card-title {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--policy-text-primary);
    margin-bottom: 0.5em;
}

body[data-page="policy"] .right-card-article {
    font-size: 0.7em;
    color: var(--policy-accent);
    font-weight: 500;
}

body[data-page="policy"] .right-card-text {
    font-size: 0.85em;
    line-height: 1.6;
    color: var(--policy-text-secondary);
    margin: 0;
}

/* ============================================ */
/*           AI SYSTEM CARDS                   */
/* ============================================ */

body[data-page="policy"] .ai-systems {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin: 1.5em 0;
}

body[data-page="policy"] .ai-system-card {
    padding: 1.5em;
    background: var(--policy-bg-card);
    border: 1px solid var(--policy-border);
    border-radius: 0.75em;
    position: relative;
    overflow: hidden;
}

body[data-page="policy"] .ai-system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #AF52DE, #FF2D55);
}

body[data-page="policy"] .ai-system-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1em;
}

body[data-page="policy"] .ai-system-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--policy-text-primary);
    margin: 0;
}

body[data-page="policy"] .ai-system-risk-badge {
    padding: 0.25em 0.6em;
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: #f0e8f8;
    border-radius: 1em;
    color: #7030a0;
    font-weight: 500;
}

[data-theme="dark"] body[data-page="policy"] .ai-system-risk-badge {
    background: #301840;
    color: #c090e0;
}

body[data-page="policy"] .ai-system-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12em, 1fr));
    gap: 0.75em 1.5em;
}

body[data-page="policy"] .ai-detail {
    font-size: 0.85em;
}

body[data-page="policy"] .ai-detail-label {
    color: var(--policy-text-tertiary);
    margin-right: 0.5em;
}

body[data-page="policy"] .ai-detail-value {
    color: var(--policy-text-secondary);
}

/* ============================================ */
/*           CONTACT CARD                      */
/* ============================================ */

body[data-page="policy"] .contact-card {
    padding: 2em;
    background: var(--policy-bg-card);
    border: 1px solid var(--policy-border);
    border-radius: 1em;
    margin: 1.5em 0;
}

body[data-page="policy"] .contact-card-title {
    font-family: var(--font-serif);
    font-size: 1.25em;
    font-weight: 400;
    color: var(--policy-text-primary);
    margin: 0 0 1em 0;
}

body[data-page="policy"] .contact-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14em, 1fr));
    gap: 1.5em;
}

body[data-page="policy"] .contact-item-label {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--policy-text-tertiary);
    margin-bottom: 0.35em;
}

body[data-page="policy"] .contact-item-value {
    font-size: 0.95em;
    color: var(--policy-text-secondary);
    line-height: 1.5;
}

body[data-page="policy"] .contact-item-value a {
    color: var(--policy-accent);
    text-decoration: none;
}

body[data-page="policy"] .contact-item-value a:hover {
    text-decoration: underline;
}

/* ============================================ */
/*           VERSION HISTORY                   */
/* ============================================ */

body[data-page="policy"] .version-timeline {
    position: relative;
    padding-left: 1.5em;
    margin: 1.5em 0;
}

body[data-page="policy"] .version-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    bottom: 0.5em;
    width: 2px;
    background: var(--policy-border);
}

body[data-page="policy"] .version-entry {
    position: relative;
    padding-bottom: 1.5em;
}

body[data-page="policy"] .version-entry:last-child {
    padding-bottom: 0;
}

body[data-page="policy"] .version-entry::before {
    content: '';
    position: absolute;
    left: -1.5em;
    top: 0.4em;
    width: 8px;
    height: 8px;
    background: var(--policy-accent);
    border-radius: 50%;
    border: 2px solid #fafafa;
}

[data-theme="dark"] body[data-page="policy"] .version-entry::before {
    border-color: #1a1a1f;
}

body[data-page="policy"] .version-number {
    font-weight: 600;
    color: var(--policy-text-primary);
    font-size: 0.9em;
}

body[data-page="policy"] .version-date {
    font-size: 0.8em;
    color: var(--policy-text-tertiary);
    margin-left: 0.5em;
}

body[data-page="policy"] .version-changes {
    font-size: 0.9em;
    color: var(--policy-text-secondary);
    margin-top: 0.35em;
    line-height: 1.5;
}

/* ============================================ */
/*           FOOTER                            */
/* ============================================ */

body[data-page="policy"] .policy-footer {
    margin-top: 4em;
    padding-top: 2em;
    border-top: 1px solid var(--policy-border);
    text-align: center;
}

body[data-page="policy"] .policy-footer-text {
    font-size: 0.8em;
    color: var(--policy-text-tertiary);
}

body[data-page="policy"] .policy-footer-logo {
    font-family: var(--font-logo, 'Bodoni Moda', serif);
    font-size: 1.25em;
    letter-spacing: 0.15em;
    color: var(--policy-text-secondary);
    margin-bottom: 0.5em;
}

/* ============================================ */
/*           RESPONSIVE DESIGN                 */
/* ============================================ */

@media (max-width: 64em) {
    body[data-page="policy"] .policy-layout {
        grid-template-columns: 1fr;
        gap: 2em;
        margin: 1em;
        padding: 1.5em;
    }

    body[data-page="policy"] .policy-sidebar {
        padding: 1.5em;
        background: var(--policy-bg-card);
        border-radius: 1em;
        border: 1px solid var(--policy-border);
    }

    body[data-page="policy"] .toc-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(12em, 1fr));
        gap: 0.25em 1em;
    }

    body[data-page="policy"] .reading-progress {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 0;
        z-index: 1000;
        height: 3px;
    }
}

@media (max-width: 40em) {
    body[data-page="policy"] .policy-layout {
        margin: 0.5em;
        padding: 1em;
        border-radius: 1em;
    }

    body[data-page="policy"] .policy-title {
        font-size: 1.75em;
    }

    body[data-page="policy"] .section-title {
        font-size: 1.25em;
    }

    body[data-page="policy"] .rights-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="policy"] .contact-items {
        grid-template-columns: 1fr;
    }

    body[data-page="policy"] .jurisdiction-badges {
        justify-content: center;
        flex-wrap: wrap;
    }

    body[data-page="policy"] .toc-nav {
        grid-template-columns: 1fr;
    }

    body[data-page="policy"] .policy-meta {
        flex-direction: column;
        gap: 0.5em;
    }

    body[data-page="policy"] .policy-sidebar {
        padding: 1em;
    }
}

/* ============================================ */
/*           PRINT STYLES                      */
/* ============================================ */

@media print {
    body[data-page="policy"] .policy-sidebar {
        display: none;
    }

    body[data-page="policy"] .policy-layout {
        display: block;
        max-width: 100%;
        padding: 0;
        margin: 0;
        background: white;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    body[data-page="policy"] .policy-content {
        max-width: 100%;
    }

    body[data-page="policy"] .policy-section {
        opacity: 1;
        transform: none;
        animation: none;
        page-break-inside: avoid;
    }

    body[data-page="policy"] .notice-box,
    body[data-page="policy"] .right-card,
    body[data-page="policy"] .ai-system-card,
    body[data-page="policy"] .contact-card {
        background: #f5f5f5;
        border: 1px solid #ddd;
    }

    body[data-page="policy"] .reading-progress {
        display: none;
    }
}

/* ============================================ */
/*           REDUCED MOTION                    */
/* ============================================ */

@media (prefers-reduced-motion: reduce) {
    body[data-page="policy"] .policy-section {
        opacity: 1;
        transform: none;
        animation: none;
    }

    body[data-page="policy"] .right-card:hover {
        transform: none;
    }

    body[data-page="policy"] .reading-progress-bar {
        transition: none;
    }
}

/**
 * @file onboarding.css
 * @description Styles for the onboarding/welcome pages (welcome.html, get-started.html)
 * @version 1.1.0
 * @created 2025-12-14
 * @updated 2026-01-25 - Added welcome page support, fixed file upload area sizing
 *
 * DEPENDENCIES:
 * - core/variables-v2.css (CSS variables)
 * - core/glass-system-v2.css (glass components)
 * - core/themes-v2.css (theme support)
 *
 * EXPORTS:
 * - .step-circle - Step indicator circles
 * - .step-indicator - Step indicator container with states (.active, .completed)
 * - .onboarding-step - Form step container with .active state
 * - .org-type-option - Organization type radio button styling
 * - .team-member-card - Team member display card
 * - .logo-preview-container - Logo preview with dashed border
 * - File upload area styling (signature upload/draw sections)
 *
 * SCOPING:
 * Targets both data-page="onboarding" and data-page="welcome"
 */

/* ============================================ */
/*              STEP INDICATORS                 */
/* ============================================ */

body[data-page="onboarding"] .step-circle,
body[data-page="welcome"] .step-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--glass-primary);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: var(--ios-body, 1.125rem);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

body[data-page="onboarding"] .step-indicator.active .step-circle,
body[data-page="welcome"] .step-indicator.active .step-circle {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    border-color: #f97316;
    color: var(--text-primary);
}

body[data-page="onboarding"] .step-indicator.completed .step-circle,
body[data-page="welcome"] .step-indicator.completed .step-circle {
    background: var(--ios-system-green);
    border-color: var(--ios-system-green);
    color: var(--text-primary);
}



/* ============================================ */
/*              ONBOARDING STEPS                */
/* ============================================ */

body[data-page="onboarding"] .onboarding-step,
body[data-page="welcome"] .onboarding-step {
    display: none;
}

body[data-page="onboarding"] .onboarding-step.active,
body[data-page="welcome"] .onboarding-step.active {
    display: block;
    animation: fadeInStep 0.3s ease;
}



@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/*          ORGANIZATION TYPE OPTIONS           */
/* ============================================ */

body[data-page="onboarding"] .org-type-option,
body[data-page="welcome"] .org-type-option {
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

body[data-page="onboarding"] .org-type-option:has(input:checked),
body[data-page="welcome"] .org-type-option:has(input:checked) {
    border-color: #f97316;
    background: var(--glass-secondary);
}

/* Fallback for browsers that don't support :has() */
body[data-page="onboarding"] .org-type-option.selected,
body[data-page="welcome"] .org-type-option.selected {
    border-color: #f97316;
    background: var(--glass-secondary);
}



/* ============================================ */
/*            TEAM MEMBER CARDS                 */
/* ============================================ */

body[data-page="onboarding"] .team-member-card,
body[data-page="welcome"] .team-member-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}



/* ============================================ */
/*          ONBOARDING FORM INPUTS              */
/* ============================================ */

/* Center-aligned input fields for onboarding */
body[data-page="onboarding"] .onboarding-input,
body[data-page="onboarding"] #onboardingForm input[type="text"],
body[data-page="onboarding"] #onboardingForm input[type="email"],
body[data-page="onboarding"] #onboardingForm input[type="tel"],
body[data-page="onboarding"] #onboardingForm select,
body[data-page="welcome"] .onboarding-input,
body[data-page="welcome"] #onboardingForm input[type="text"],
body[data-page="welcome"] #onboardingForm input[type="email"],
body[data-page="welcome"] #onboardingForm input[type="tel"],
body[data-page="welcome"] #onboardingForm select {
    text-align: center;
}

/* Placeholder text also centered */
body[data-page="onboarding"] #onboardingForm input::placeholder,
body[data-page="welcome"] #onboardingForm input::placeholder {
    text-align: center;
}

/* ============================================ */
/*          INPUT FOCUS/FILLED STATES           */
/* ============================================ */

/* Ensure inputs maintain glass styling on focus */
body[data-page="onboarding"] #onboardingForm input:focus,
body[data-page="onboarding"] #onboardingForm select:focus,
body[data-page="welcome"] #onboardingForm input:focus,
body[data-page="welcome"] #onboardingForm select:focus {
    background: var(--glass-secondary) !important;
    border-color: var(--ios-system-orange) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15) !important;
    outline: none;
}

/* Override browser autofill white background */
body[data-page="onboarding"] #onboardingForm input:-webkit-autofill,
body[data-page="onboarding"] #onboardingForm input:-webkit-autofill:hover,
body[data-page="onboarding"] #onboardingForm input:-webkit-autofill:focus,
body[data-page="welcome"] #onboardingForm input:-webkit-autofill,
body[data-page="welcome"] #onboardingForm input:-webkit-autofill:hover,
body[data-page="welcome"] #onboardingForm input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--input-bg-solid, var(--glass-secondary)) inset !important;
    box-shadow: 0 0 0px 1000px var(--input-bg-solid, var(--glass-secondary)) inset !important;
    background-color: var(--input-bg-solid, var(--glass-secondary)) !important;
    border-color: var(--ios-system-orange) !important;

    transition: background-color 5000s ease-in-out 0s;
}

/* Ensure filled inputs maintain consistent styling */
body[data-page="onboarding"] #onboardingForm input:not(:placeholder-shown),
body[data-page="onboarding"] #onboardingForm select:valid,
body[data-page="welcome"] #onboardingForm input:not(:placeholder-shown),
body[data-page="welcome"] #onboardingForm select:valid {
    background: var(--glass-primary) !important;
}



/* ============================================ */
/*          ONBOARDING BUTTONS                  */
/* ============================================ */

body[data-page="onboarding"] .onboarding-btn-primary,
body[data-page="welcome"] .onboarding-btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: var(--text-primary);
}

body[data-page="onboarding"] .onboarding-btn-primary:hover,
body[data-page="welcome"] .onboarding-btn-primary:hover {
    opacity: 0.9;
}

body[data-page="onboarding"] .onboarding-btn-success,
body[data-page="welcome"] .onboarding-btn-success {
    background: var(--ios-system-green);
    color: var(--text-primary);
}



/* ============================================ */
/*          OTP VERIFICATION SECTION            */
/* ============================================ */

body[data-page="onboarding"] .otp-input,
body[data-page="welcome"] .otp-input {
    font-size: 1.5rem;
    letter-spacing: 0.25em;
    text-align: center;
}



/* ============================================ */
/*          RESPONSIVE ADJUSTMENTS              */
/* ============================================ */

@media (max-width: 48em) {
    body[data-page="onboarding"] .step-circle,
    body[data-page="welcome"] .step-circle {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 0.875rem;
    }

    body[data-page="onboarding"] #onboardingForm .grid-cols-3,
    body[data-page="onboarding"] #onboardingForm .grid-cols-2,
    body[data-page="welcome"] #onboardingForm .grid-cols-3,
    body[data-page="welcome"] #onboardingForm .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    body[data-page="onboarding"] .team-member-card,
    body[data-page="welcome"] .team-member-card {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}


/* ============================================ */
/*          ONBOARDING PAGE CONTAINERS          */
/* ============================================ */

body[data-page="onboarding"] .onboarding-container,
body[data-page="welcome"] .onboarding-container {
    min-height: 100vh;
}

body[data-page="onboarding"] .onboarding-card,
body[data-page="welcome"] .onboarding-card {
    max-width: 85rem;
}



/* ============================================ */
/*          LOGO PREVIEW CONTAINER              */
/* ============================================ */

body[data-page="onboarding"] .logo-preview-container,
body[data-page="welcome"] .logo-preview-container {
    width: 7.5rem;    /* 120px - compact logo preview */
    height: 5rem;     /* 80px */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--glass-primary);
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

body[data-page="onboarding"] .logo-preview-image,
body[data-page="welcome"] .logo-preview-image {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body[data-page="onboarding"] .logo-preview-image.visible,
body[data-page="welcome"] .logo-preview-image.visible {
    display: block;
}

/* ============================================ */
/*          FILE UPLOAD AREAS                   */
/* ============================================ */

/* Compact signature upload dropzone */
body[data-page="onboarding"] #onboarding-signature-upload-content .glass-container-thin,
body[data-page="welcome"] #onboarding-signature-upload-content .glass-container-thin {
    padding: 1.5rem 1rem;
    max-height: 8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--glass-border);
    transition: all 0.2s ease;
}

body[data-page="onboarding"] #onboarding-signature-upload-content .glass-container-thin:hover,
body[data-page="welcome"] #onboarding-signature-upload-content .glass-container-thin:hover {
    border-color: var(--ios-system-orange);
    background: var(--glass-hover);
}

/* Constrain SVG icons within upload areas */
body[data-page="onboarding"] #onboarding-signature-upload-content svg,
body[data-page="welcome"] #onboarding-signature-upload-content svg {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

/* Signature canvas container */
body[data-page="onboarding"] #onboarding-signature-draw-content .glass-container-thin,
body[data-page="welcome"] #onboarding-signature-draw-content .glass-container-thin {
    border: 1px dashed var(--glass-border);
}

/* Signature preview container */
body[data-page="onboarding"] #onboarding-signature-preview-container .glass-container-thin,
body[data-page="welcome"] #onboarding-signature-preview-container .glass-container-thin {
    max-height: 10rem;
}



/* ============================================ */
/*          LOADING SPINNER                     */
/* ============================================ */

body[data-page="onboarding"] .onboarding-spinner,
body[data-page="welcome"] .onboarding-spinner {
    border-color: #f97316;
    border-right-color: transparent;
}



/* ============================================ */
/*          SMALL BUTTONS                       */
/* ============================================ */

body[data-page="onboarding"] .btn-sm,
body[data-page="welcome"] .btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

body[data-page="onboarding"] .btn-sm-icon,
body[data-page="welcome"] .btn-sm-icon {
    width: 14px;
    height: 14px;
}

/* ============================================ */
/*          HELPER TEXT                         */
/* ============================================ */

body[data-page="onboarding"] .text-xs,
body[data-page="welcome"] .text-xs {
    font-size: 11px;
}



/**
 * COEUS DESIGN SYSTEM - LIEGENSCHAFTEN PAGE
 * ==========================================
 * Property management page with building matrix visualization
 * Extracted from inline <style> block for CSS compliance
 *
 * Features:
 * - Building matrix visualization
 * - Floor-based unit organization
 * - Inspector panel for property/unit details
 * - Theme-aware glass morphism
 * - Portfolio view with aggregate stats (Feature 1: 2026-02-19)
 * - Estate manager delegation modal
 *
 * Dependencies: core/variables-v2.css, core/themes-v2.css
 * Created: 2025-12
 * Updated: 2026-02-20 - Wider nav column (22em), Apple-quality property list: clean flex layout, pill tags (nav-tag system), prop-content/prop-name/prop-address/prop-tags/prop-unit-pill, fixed nav segmented control
 */

/* --- BASE STYLES --- */
* {
 box-sizing: border-box; -webkit-font-smoothing: antialiased; }



body[data-page="liegenschaften"] {

    margin: 0;
    font-family: var(--font-sans);
    color: var(--text-primary);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    /* CRITICAL: Inherit background from html to prevent white flash */
    background: inherit;
}



/* --- LAYOUT GRID --- */
body[data-page="liegenschaften"] .layout-grid {

    display: grid;
    grid-template-columns: 22em 1fr; /* Nav | Main Matrix — wider for badges */
    height: 100vh;
    gap: 1.25em;
    padding: 1.25em;
    max-width: 120em;
    margin: 0 auto;
    box-sizing: border-box;
}



/* Adjust main-content for liegenschaften page - fill app-layout flex parent */
body[data-page="liegenschaften"] #main-content.main-content {

    display: block;
    flex: 1;
    min-width: 0;
}



/* --- SHARED GLASS STYLES --- */
body[data-page="liegenschaften"] .glass-panel {

    background: var(--glass-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg, 1.5em);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}



/* --- COLUMN 1: NAVIGATION --- */
body[data-page="liegenschaften"] .nav-panel {

    z-index: 10;
}



body[data-page="liegenschaften"] .nav-header {

    padding: 1.5em;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="liegenschaften"] .nav-list {

    flex: 1;
    overflow-y: auto;
    padding: 0.75em;
}



body[data-page="liegenschaften"] .property-row {

    display: flex;
    align-items: flex-start;
    gap: 0.75em;
    padding: 0.625em 0.875em;
    margin-bottom: 0.25em;
    border-radius: 0.75em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    border: 1px solid transparent;
}



body[data-page="liegenschaften"] .property-row:hover {

    background: var(--glass-hover);
}



body[data-page="liegenschaften"] .property-row.active {

    background: var(--glass-primary);
    border-color: var(--glass-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}



body[data-page="liegenschaften"] .property-icon {

    width: 2.25em;
    height: 2.25em;
    min-width: 2.25em; /* Prevent shrinking */
    flex-shrink: 0;
    background: var(--glass-hover);
    border-radius: 0.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75em;
    color: var(--ios-system-orange);
    overflow: hidden; /* Clip image to container */
    position: relative;
}



body[data-page="liegenschaften"] .property-icon img {

    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 0.5em;
    display: block;
}



/* --- COLUMN 2: MATRIX VIEW --- */
body[data-page="liegenschaften"] .matrix-panel {

    position: relative;
}



body[data-page="liegenschaften"] .matrix-header {

    padding: 1.5em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-hover);
}



body[data-page="liegenschaften"] .matrix-scroll {

    flex: 1;
    overflow-y: auto;
    padding: 1.25em;
    display: flex;
    flex-direction: column-reverse; /* Building stacks up */
    gap: 1.25em;
}



/* The Building Stack Visualization */
body[data-page="liegenschaften"] .building-shell {

    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em 0.5em 0.25em 0.25em;
    padding: 1.25em;
    width: 100%;
    display: flex;
    flex-direction: column-reverse; /* Stack floors bottom-up inside shell */
    gap: 0.75em;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}



body[data-page="liegenschaften"] .floor-stack {

    background: var(--glass-hover);
    border-radius: 0.25em;
    padding: 0.75em 1em;
    border-bottom: 4px solid var(--glass-border); /* Concrete slab look */
    position: relative;
    transition: background 0.2s;
    display: flex;
    gap: 1em;
    align-items: stretch;
}



body[data-page="liegenschaften"] .floor-stack:hover {

    background: var(--glass-secondary);
}



body[data-page="liegenschaften"] .floor-meta {

    width: 5em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding-right: 1em;
    border-right: 1px dashed var(--glass-border);
}



body[data-page="liegenschaften"] .floor-label {

    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}



body[data-page="liegenschaften"] .floor-actions {

    margin-top: 0.5em;
    opacity: 0;
    transition: opacity 0.2s;
}



body[data-page="liegenschaften"] .floor-stack:hover .floor-actions {

    opacity: 1;
}



body[data-page="liegenschaften"] .unit-row {

    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.75em, 1fr));
    gap: 0.75em;
}



body[data-page="liegenschaften"] .unit-cell {

    background: var(--glass-secondary);
    border-radius: 0.375em;
    padding: 0.625em;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 5em;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}



body[data-page="liegenschaften"] .unit-cell:hover {

    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    z-index: 2;
    border-color: var(--ios-system-orange);
}



body[data-page="liegenschaften"] .unit-cell.selected {

    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 2px var(--ios-system-orange);
}



/* Status Colors - theme-aware */
body[data-page="liegenschaften"] .unit-cell.occupied {

    border-top: 3px solid var(--ios-system-green);
}



body[data-page="liegenschaften"] .unit-cell.vacant {

    border-top: 3px solid var(--ios-system-orange);
    background: var(--glass-hover);
}



body[data-page="liegenschaften"] .unit-cell.maintenance {

    border-top: 3px solid var(--ios-system-red);
    background: var(--glass-hover);
}



body[data-page="liegenschaften"] .unit-name {

    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
}



body[data-page="liegenschaften"] .unit-tenant {

    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.25em;
}



body[data-page="liegenschaften"] .unit-price {

    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-primary);
    margin-top: auto;
    padding-top: 0.5em;
    font-weight: 600;
}



body[data-page="liegenschaften"] .add-unit-btn {

    border: 2px dashed var(--glass-border);
    background: transparent;
    border-radius: 0.375em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s;
}



body[data-page="liegenschaften"] .add-unit-btn:hover {

    border-color: var(--ios-system-orange);
    color: var(--ios-system-orange);
    background: var(--glass-hover);
}



/* Unit cell photo container */
body[data-page="liegenschaften"] .unit-cell-photo-container {

    width: 100%;
    height: 3.125em;
    border-radius: 0.25em;
    margin-bottom: 0.25em;
    overflow: hidden;
    background: var(--glass-secondary);
}



body[data-page="liegenschaften"] .unit-cell-photo {

    width: 100%;
    height: 3.125em;
    object-fit: cover;
    border-radius: 0.25em;
}



/* --- COLUMN 3: INSPECTOR PANEL --- */
body[data-page="liegenschaften"] .inspector-panel {

    background: var(--glass-secondary); /* Theme-aware opaque glass */
}



body[data-page="liegenschaften"] .inspector-content {

    padding: 1.5em;
    overflow-y: auto;
    flex: 1;
}



body[data-page="liegenschaften"] .inspector-empty {

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-tertiary);
    text-align: center;
    padding: 2.5em;
}



body[data-page="liegenschaften"] .inspector-scroll {

    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    min-height: 0;
}



body[data-page="liegenschaften"] .inspector-section {

    background: var(--glass-primary);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}



body[data-page="liegenschaften"] .inspector-section-title {

    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}



body[data-page="liegenschaften"] .inspector-subsection {

    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
}



body[data-page="liegenschaften"] .inspector-subsection:last-child {

    border-bottom: none;
    padding-bottom: 0;
}



body[data-page="liegenschaften"] .checkbox-label {

    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
}



body[data-page="liegenschaften"] .checkbox-label input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--ios-system-orange);
    cursor: pointer;
    /* Ensure visibility on all themes */
    border: 2px solid var(--text-tertiary);
    border-radius: 0.25rem;
    background: var(--glass-primary);
    /* Remove default appearance and style manually for better cross-browser support */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    flex-shrink: 0;
}

body[data-page="liegenschaften"] .checkbox-label input[type="checkbox"]:hover {
    border-color: var(--text-secondary);
    background: var(--glass-hover);
}

body[data-page="liegenschaften"] .checkbox-label input[type="checkbox"]:checked {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
}

body[data-page="liegenschaften"] .checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 0.3rem;
    top: 0.1rem;
    width: 0.35rem;
    height: 0.6rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}



body[data-page="liegenschaften"] .form-row-2 {

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}



/* --- UI ELEMENTS --- */
body[data-page="liegenschaften"] .glass-btn {

    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    padding: 0.5em 1em;
    border-radius: 1.25em;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    transition: all 0.2s;
    color: var(--text-primary);
}



body[data-page="liegenschaften"] .glass-btn:hover {

    background: var(--glass-hover);
    transform: translateY(-1px);
}



body[data-page="liegenschaften"] .glass-btn.primary {

    background: linear-gradient(135deg, #ff5e3a 0%, #ff6b47 50%, #ffb347 100%);
    color: var(--text-primary);
    border: none;
    box-shadow: 0 4px 12px rgba(255, 94, 58, 0.4);
}



body[data-page="liegenschaften"] .glass-btn.primary:hover {

    background: linear-gradient(135deg, #ff6b47 0%, #ff7a5c 50%, #ffc266 100%);
    box-shadow: 0 6px 16px rgba(255, 94, 58, 0.5);
}



body[data-page="liegenschaften"] .glass-btn.danger {

    color: var(--ios-system-red);
    border-color: var(--ios-system-red);
}



body[data-page="liegenschaften"] .glass-btn.xs {

    padding: 0.25em 0.5em;
    font-size: 0.7rem;
}



body[data-page="liegenschaften"] .glass-input {

    width: 100%;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    padding: 0.625em 0.75em;
    border-radius: 0.5em;
    font-family: inherit;
    margin-bottom: 0.75em;
    color: var(--text-primary);
}



body[data-page="liegenschaften"] .glass-input:focus {

    outline: none;
    background: var(--glass-secondary);
    border-color: var(--ios-system-orange);
}



body[data-page="liegenschaften"] .glass-input::placeholder {

    color: var(--text-tertiary);
}



/* Explicit dark theme overrides for modal inputs */
body[data-page="liegenschaften"] [data-theme="dark"] .modal-content .glass-input,
body[data-page="liegenschaften"] [data-theme="darkart"] .modal-content .glass-input,
body[data-page="liegenschaften"] [data-theme="darkmodern"] .modal-content .glass-input,
body[data-page="liegenschaften"] [data-theme="dark"] #inspectorPanel .glass-input,
body[data-page="liegenschaften"] [data-theme="darkart"] #inspectorPanel .glass-input,
body[data-page="liegenschaften"] [data-theme="darkmodern"] #inspectorPanel .glass-input {

    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: var(--text-primary) !important;
}



body[data-page="liegenschaften"] [data-theme="dark"] .modal-content .glass-input:focus,
body[data-page="liegenschaften"] [data-theme="darkart"] .modal-content .glass-input:focus,
body[data-page="liegenschaften"] [data-theme="darkmodern"] .modal-content .glass-input:focus,
body[data-page="liegenschaften"] [data-theme="dark"] #inspectorPanel .glass-input:focus,
body[data-page="liegenschaften"] [data-theme="darkart"] #inspectorPanel .glass-input:focus,
body[data-page="liegenschaften"] [data-theme="darkmodern"] #inspectorPanel .glass-input:focus {

    background: rgba(255, 255, 255, 0.12) !important;
    border-color: var(--ios-system-orange) !important;
}



body[data-page="liegenschaften"] [data-theme="dark"] .modal-content .glass-input::placeholder,
body[data-page="liegenschaften"] [data-theme="darkart"] .modal-content .glass-input::placeholder,
body[data-page="liegenschaften"] [data-theme="darkmodern"] .modal-content .glass-input::placeholder,
body[data-page="liegenschaften"] [data-theme="dark"] #inspectorPanel .glass-input::placeholder,
body[data-page="liegenschaften"] [data-theme="darkart"] #inspectorPanel .glass-input::placeholder,
body[data-page="liegenschaften"] [data-theme="darkmodern"] #inspectorPanel .glass-input::placeholder {

    color: var(--text-quaternary) !important;
}



body[data-page="liegenschaften"] .label-xs {

    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-weight: 700;
    margin-bottom: 0.375em;
    letter-spacing: 0.5px;
}



/* --- TABS --- */
body[data-page="liegenschaften"] .tabs {
    display: flex;
    gap: 0.25em;
    margin-bottom: 1.25em;
    background: var(--glass-primary);
    padding: 0.25em;
    border-radius: 0.75em;
    /* Support scrolling for 7+ tabs */
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Hide scrollbar on webkit but keep functionality */
body[data-page="liegenschaften"] .tabs::-webkit-scrollbar {
    height: 4px;
}

body[data-page="liegenschaften"] .tabs::-webkit-scrollbar-track {
    background: transparent;
}

body[data-page="liegenschaften"] .tabs::-webkit-scrollbar-thumb {
    background: var(--glass-secondary);
    border-radius: 2px;
}

body[data-page="liegenschaften"] .tab-btn {
    flex: 0 0 auto;
    padding: 0.5em 0.75em;
    border: none;
    background: transparent;
    border-radius: 0.5em;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-tertiary);
    white-space: nowrap;
}



body[data-page="liegenschaften"] .tab-btn.active {

    background: var(--glass-secondary);
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}



/* --- RESPONSIVE --- */
@media (max-width: 80em) {

    body[data-page="liegenschaften"] .layout-grid {

        grid-template-columns: 19em 1fr;
    }


}


@media (max-width: 48em) {

    body[data-page="liegenschaften"] .layout-grid {

        grid-template-columns: 1fr;
        padding: 0.625em;
    }



    body[data-page="liegenschaften"] .nav-panel {

        display: none; /* Mobile Menu would go here */
    }



    body[data-page="liegenschaften"] .nav-panel.open {

        display: flex;
        position: fixed;
        inset: 0.625em;
        z-index: 100;
    }


}


/* --- TOAST --- */
body[data-page="liegenschaften"] #toastContainer {

    position: fixed;
    top: 1.25em;
    right: 1.25em;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.625em;
}



body[data-page="liegenschaften"] .toast {

    background: var(--glass-secondary);
    border-radius: 0.75em;
    padding: 0.75em 1em;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.625em;
    animation: slideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-left: 4px solid var(--ios-system-green);
    color: var(--text-primary);
}



body[data-page="liegenschaften"] .toast-success {

    border-left-color: var(--ios-system-green);
}



body[data-page="liegenschaften"] .toast-error {

    border-left-color: var(--ios-system-red);
}



@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- MODAL --- */
body[data-page="liegenschaften"] .modal-overlay {

    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}



body[data-page="liegenschaften"] .modal-overlay.open {

    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}



body[data-page="liegenschaften"] .modal-content {

    background: var(--glass-secondary);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl, 1.5em);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 40em;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
    color: var(--text-primary);
}



body[data-page="liegenschaften"] .modal-overlay.open .modal-content {

    transform: scale(1) translateY(0);
}



body[data-page="liegenschaften"] .modal-header {

    padding: 1.25em 1.5em;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}



body[data-page="liegenschaften"] .modal-header h3 {

    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}



body[data-page="liegenschaften"] .modal-body {

    padding: 1.5em;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}



body[data-page="liegenschaften"] .modal-footer {

    padding: 1em 1.5em;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75em;
}

/* =========================================
   LIGHT THEME MODAL OVERRIDES
   ========================================= */

/* Light theme modal content - white background */
[data-theme="light"] body[data-page="liegenschaften"] .modal-content,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(44, 62, 80, 0.15) !important;
}

/* Light theme modal header */
[data-theme="light"] body[data-page="liegenschaften"] .modal-header,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-header,
body[data-page="liegenschaften"] [data-theme="light"] .modal-header,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-header {
    border-bottom: 1px solid rgba(44, 62, 80, 0.12) !important;
}

[data-theme="light"] body[data-page="liegenschaften"] .modal-header h3,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-header h3,
body[data-page="liegenschaften"] [data-theme="light"] .modal-header h3,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-header h3 {
    color: rgba(44, 62, 80, 0.95) !important;
}

/* Light theme modal text colors */
[data-theme="light"] body[data-page="liegenschaften"] .modal-content,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content {
    color: rgba(44, 62, 80, 0.95) !important;
}

/* Light theme form labels */
[data-theme="light"] body[data-page="liegenschaften"] .modal-content label,
[data-theme="light"] body[data-page="liegenschaften"] .modal-content .form-label,
[data-theme="light"] body[data-page="liegenschaften"] .modal-content .section-title,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content label,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content .form-label,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content .section-title,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content label,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content .form-label,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content .section-title,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content label,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content .form-label,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content .section-title {
    color: rgba(44, 62, 80, 0.85) !important;
}

/* Light theme input fields in modal */
[data-theme="light"] body[data-page="liegenschaften"] .modal-content .glass-input,
[data-theme="light"] body[data-page="liegenschaften"] .modal-content input,
[data-theme="light"] body[data-page="liegenschaften"] .modal-content select,
[data-theme="light"] body[data-page="liegenschaften"] .modal-content textarea,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content .glass-input,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content input,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content select,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content textarea,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content .glass-input,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content input,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content select,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content textarea,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content .glass-input,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content input,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content select,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content textarea {
    background: rgba(255, 255, 255, 0.90) !important;
    border: 1px solid rgba(44, 62, 80, 0.20) !important;
    color: rgba(44, 62, 80, 0.95) !important;
}

[data-theme="light"] body[data-page="liegenschaften"] .modal-content .glass-input::placeholder,
[data-theme="light"] body[data-page="liegenschaften"] .modal-content input::placeholder,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content .glass-input::placeholder,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content input::placeholder,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content .glass-input::placeholder,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content input::placeholder,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content .glass-input::placeholder,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content input::placeholder {
    color: rgba(44, 62, 80, 0.45) !important;
}

/* Light theme tabs in modal */
[data-theme="light"] body[data-page="liegenschaften"] .modal-content .tab-btn,
[data-theme="light"] body[data-page="liegenschaften"] .modal-content .inspector-tab,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content .tab-btn,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content .inspector-tab,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content .tab-btn,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content .inspector-tab,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content .tab-btn,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content .inspector-tab {
    color: rgba(44, 62, 80, 0.75) !important;
    background: transparent !important;
}

[data-theme="light"] body[data-page="liegenschaften"] .modal-content .tab-btn.active,
[data-theme="light"] body[data-page="liegenschaften"] .modal-content .inspector-tab.active,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content .tab-btn.active,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content .inspector-tab.active,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content .tab-btn.active,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content .inspector-tab.active,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content .tab-btn.active,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content .inspector-tab.active {
    color: rgba(44, 62, 80, 0.95) !important;
    background: rgba(255, 255, 255, 0.80) !important;
    border-color: rgba(44, 62, 80, 0.20) !important;
}

/* Light theme modal footer */
[data-theme="light"] body[data-page="liegenschaften"] .modal-footer,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-footer,
body[data-page="liegenschaften"] [data-theme="light"] .modal-footer,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-footer {
    border-top: 1px solid rgba(44, 62, 80, 0.12) !important;
}

/* Light theme modal buttons */
[data-theme="light"] body[data-page="liegenschaften"] .modal-content .glass-btn,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content .glass-btn,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content .glass-btn,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content .glass-btn {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(44, 62, 80, 0.18) !important;
    color: rgba(44, 62, 80, 0.90) !important;
}

[data-theme="light"] body[data-page="liegenschaften"] .modal-content .glass-btn:hover,
[data-theme="lightmodern"] body[data-page="liegenschaften"] .modal-content .glass-btn:hover,
body[data-page="liegenschaften"] [data-theme="light"] .modal-content .glass-btn:hover,
body[data-page="liegenschaften"] [data-theme="lightmodern"] .modal-content .glass-btn:hover {
    background: rgba(255, 255, 255, 1) !important;
}

/* Light theme inspector panel (same as modal) */
[data-theme="light"] body[data-page="liegenschaften"] #inspectorPanel .modal-content,
[data-theme="lightmodern"] body[data-page="liegenschaften"] #inspectorPanel .modal-content,
body[data-page="liegenschaften"] [data-theme="light"] #inspectorPanel .modal-content,
body[data-page="liegenschaften"] [data-theme="lightmodern"] #inspectorPanel .modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
}

body[data-page="liegenschaften"] .form-row {

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75em;
    gap: 0.75em;
}



body[data-page="liegenschaften"] .form-group {

    margin-bottom: 1em;
}



body[data-page="liegenschaften"] .form-group:last-child {

    margin-bottom: 0;
}



body[data-page="liegenschaften"] .form-divider {

    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 1em 0;
}



body[data-page="liegenschaften"] .form-section-label {

    margin-bottom: 0.75em;
    color: var(--text-secondary);
}



/* Cover photo styles */
body[data-page="liegenschaften"] .photo-card {

    position: relative;
}



body[data-page="liegenschaften"] .photo-card .cover-badge {

    position: absolute;
    top: 0.25em;
    left: 0.25em;
    background: var(--ios-system-green);
    color: var(--text-on-accent, #fff);
    font-size: 0.6rem;
    padding: 0.125em 0.375em;
    border-radius: 0.25em;
    font-weight: 700;
}



body[data-page="liegenschaften"] .photo-card .set-cover-btn {

    position: absolute;
    bottom: 0.25em;
    right: 0.25em;
    background: var(--glass-hover);
    color: var(--text-primary);
    font-size: 0.65rem;
    padding: 0.1875em 0.375em;
    border-radius: 0.25em;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}



body[data-page="liegenschaften"] .photo-card:hover .set-cover-btn {

    opacity: 1;
}



/* Photo grid layouts */
body[data-page="liegenschaften"] .unit-photos-grid {

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5em;
}



body[data-page="liegenschaften"] .building-photos-row {

    display: flex;
    gap: 0.5em;
    overflow-x: auto;
    padding: 0.25em 0;
}



body[data-page="liegenschaften"] .photo-card-placeholder {

    aspect-ratio: 1;
    border-radius: 0.5em;
    overflow: hidden;
    background: var(--glass-secondary, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}



body[data-page="liegenschaften"] .photo-card-placeholder.bldg-photo {

    flex-shrink: 0;
    width: 6.25em;
    height: 6.25em;
}



body[data-page="liegenschaften"] .photo-card-placeholder .placeholder-icon {

    width: 2em;
    height: 2em;
    opacity: 0.3;
}



body[data-page="liegenschaften"] .photo-card-placeholder.bldg-photo .placeholder-icon {

    width: 1.25em;
    height: 1.25em;
}



body[data-page="liegenschaften"] .photo-card-placeholder.bldg-photo .cover-badge {

    font-size: 0.5rem;
    padding: 0.0625em 0.1875em;
}



body[data-page="liegenschaften"] .photo-card-placeholder.bldg-photo .set-cover-btn {

    font-size: 0.5rem;
    padding: 0.125em 0.25em;
}



body[data-page="liegenschaften"] .photo-card-img {

    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}



/* --- UTILITY CLASSES for theme-awareness --- */
body[data-page="liegenschaften"] .btn-icon-sm {

    padding: 0.375em;
}



body[data-page="liegenschaften"] .icon-xl {

    width: 4em;
    height: 4em;
}



body[data-page="liegenschaften"] .icon-lg {

    width: 3em;
    height: 3em;
}



body[data-page="liegenschaften"] .icon-md {

    width: 2em;
    height: 2em;
}



body[data-page="liegenschaften"] .opacity-10 {

    opacity: 0.1;
}



body[data-page="liegenschaften"] .opacity-20 {

    opacity: 0.2;
}



body[data-page="liegenschaften"] .opacity-30 {

    opacity: 0.3;
}



body[data-page="liegenschaften"] .border-glass {

    border-color: var(--glass-border);
}



body[data-page="liegenschaften"] .border-success {

    border-color: var(--ios-system-green);
}



body[data-page="liegenschaften"] .glass-badge {

    background: var(--glass-primary);
}



/* Document card styles - theme aware */
body[data-page="liegenschaften"] .docs-grid {

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5em;
}



body[data-page="liegenschaften"] .doc-card {

    background: var(--glass-primary);
    border-radius: 0.5em;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: all 0.2s;
}



body[data-page="liegenschaften"] .doc-card:hover {

    background: var(--glass-hover);
}



body[data-page="liegenschaften"] .doc-thumb {

    height: 5em;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}



body[data-page="liegenschaften"] .doc-card-info {

    padding: 0.5em;
}



body[data-page="liegenschaften"] .doc-card-name {

    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}



body[data-page="liegenschaften"] .thumb-img {

    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* --- FLOOR PLAN PICKER --- */
body[data-page="liegenschaften"] .floor-plan-picker {

    margin-top: 0.5em;
}



body[data-page="liegenschaften"] .floor-plan-preview {

    display: flex;
    gap: 0.75em;
    align-items: center;
}



body[data-page="liegenschaften"] .floor-plan-thumbnail {

    width: 5em;
    height: 5em;
    border-radius: 0.5em;
    overflow: hidden;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}



body[data-page="liegenschaften"] .floor-plan-thumbnail:hover {

    background: var(--glass-hover);
    transform: scale(1.02);
}



body[data-page="liegenschaften"] .floor-plan-thumbnail img {

    width: 100%;
    height: 100%;
    object-fit: cover;
}



body[data-page="liegenschaften"] .floor-plan-thumbnail .pdf-placeholder {

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25em;
    color: var(--text-tertiary);
}



body[data-page="liegenschaften"] .floor-plan-thumbnail .pdf-placeholder span {

    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}



body[data-page="liegenschaften"] .floor-plan-actions {

    display: flex;
    flex-direction: column;
    gap: 0.375em;
}



body[data-page="liegenschaften"] .floor-plan-actions .glass-btn {

    padding: 0.375em 0.625em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25em;
}



body[data-page="liegenschaften"] .floor-plan-actions .glass-btn.danger {

    color: var(--ios-system-red);
}



body[data-page="liegenschaften"] .floor-plan-empty {

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75em;
}



body[data-page="liegenschaften"] .floor-plan-placeholder {

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375em;
    color: var(--text-tertiary);
}



body[data-page="liegenschaften"] .floor-plan-upload-buttons {

    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
    justify-content: center;
}



body[data-page="liegenschaften"] .floor-plan-upload-buttons .glass-btn {

    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 0.75em;
}



/* Floor Plan Modal */
body[data-page="liegenschaften"] .floor-plan-modal-overlay {

    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}



body[data-page="liegenschaften"] .floor-plan-modal {

    width: 90%;
    max-width: 25em;
    animation: modalFadeIn 0.2s ease;
}



@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

body[data-page="liegenschaften"] .floor-plan-doc-list {

    max-height: 50vh;
    overflow-y: auto;
}



body[data-page="liegenschaften"] .floor-plan-doc-item {

    transition: all 0.2s;
}



body[data-page="liegenschaften"] .floor-plan-doc-item:hover {

    background: var(--glass-hover);
    transform: translateX(0.25em);
}



body[data-page="liegenschaften"] .floor-plan-doc-item .doc-icon {

    color: var(--text-tertiary);
}


/* ========================================
 * PROPERTY VALUATION SECTION
 * For building modal - Immobilienbewertung
 * ======================================== */

body[data-page="liegenschaften"] .property-valuation-section {
    margin-top: 1.5em;
    padding-top: 1em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="liegenschaften"] .property-valuation-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1em;
}

body[data-page="liegenschaften"] .property-valuation-section .section-header h4 {
    margin: 0;
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .property-valuation-section .toggle-valuation-btn {
    padding: 0.25em;
    width: 1.75em;
    height: 1.75em;
    min-width: unset;
}

body[data-page="liegenschaften"] .property-valuation-section .valuation-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    overflow: hidden;
    max-height: 500px;
    opacity: 1;
    transition: all 0.3s ease;
}

body[data-page="liegenschaften"] .property-valuation-section .valuation-fields.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

/* Building modal needs extra width for 3-column valuation fields */
body[data-page="liegenschaften"] #buildingModal .modal-content {
    max-width: 52em;
}

/* Select/dropdown focus and active states — use accent orange instead of browser blue */
body[data-page="liegenschaften"] .modal-content select:focus,
body[data-page="liegenschaften"] .modal-content input:focus,
body[data-page="liegenschaften"] .modal-content textarea:focus {
    outline: none;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 0.15em rgba(255, 149, 0, 0.25);
}

/* Select option highlight (WebKit) */
body[data-page="liegenschaften"] .modal-content select option:checked,
body[data-page="liegenschaften"] .modal-content select option:hover {
    background-color: var(--accent-primary);
    color: var(--button-text-on-color);
}

/* 3-column form row for property values */
body[data-page="liegenschaften"] .form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75em;
}

@media (max-width: 48em) {
    body[data-page="liegenschaften"] #buildingModal .modal-content {
        max-width: 90%;
    }
    body[data-page="liegenschaften"] .form-row-3 {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   SONDEREIGENTUM — Unit Type Badges, Connected Units, Floor Bar
   ============================================================ */

/* Unit type badge inside unit-cell */
body[data-page="liegenschaften"] .unit-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-size: 0.6em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15em 0.5em;
    border-radius: 0.25em;
    line-height: 1.4;
    white-space: nowrap;
    color: var(--text-secondary);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
}

body[data-page="liegenschaften"] .unit-type-badge--parking {
    color: var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.1);
    border-color: rgba(255, 149, 0, 0.2);
}

body[data-page="liegenschaften"] .unit-type-badge--storage {
    color: var(--ios-system-purple);
    background: rgba(175, 82, 222, 0.1);
    border-color: rgba(175, 82, 222, 0.2);
}

body[data-page="liegenschaften"] .unit-type-badge--garden {
    color: var(--ios-system-green);
    background: rgba(52, 199, 89, 0.1);
    border-color: rgba(52, 199, 89, 0.2);
}

body[data-page="liegenschaften"] .unit-type-badge--attic {
    color: var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.1);
    border-color: rgba(255, 149, 0, 0.2);
}

body[data-page="liegenschaften"] .unit-type-badge--bike_parking {
    color: var(--ios-system-teal);
    background: rgba(90, 200, 250, 0.1);
    border-color: rgba(90, 200, 250, 0.2);
}

body[data-page="liegenschaften"] .unit-type-badge--office,
body[data-page="liegenschaften"] .unit-type-badge--retail,
body[data-page="liegenschaften"] .unit-type-badge--commercial {
    color: var(--ios-system-indigo);
    background: rgba(88, 86, 214, 0.1);
    border-color: rgba(88, 86, 214, 0.2);
}

/* Sondereigentum unit cell — compact variant */
body[data-page="liegenschaften"] .unit-cell--sondereigentum {
    min-height: 3.5em;
    background: var(--glass-primary);
    border: 1px dashed var(--glass-border);
    border-top: 2px solid var(--ios-system-orange);
}

body[data-page="liegenschaften"] .unit-cell--sondereigentum:hover {
    border-color: var(--ios-system-orange);
    border-style: solid;
}

body[data-page="liegenschaften"] .unit-cell--sondereigentum.occupied {
    border-top-color: var(--ios-system-green);
}

body[data-page="liegenschaften"] .unit-cell--sondereigentum.vacant {
    border-top-color: var(--ios-system-orange);
}

/* Connected unit indicator — small link icon + label */
body[data-page="liegenschaften"] .unit-link-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2em;
    font-size: 0.55em;
    color: var(--ios-system-orange);
    opacity: 0.8;
    margin-top: 0.15em;
}

body[data-page="liegenschaften"] .unit-link-badge .radix-icon {
    font-size: 0.85em;
}

/* Sondereigentum section below each floor */
body[data-page="liegenschaften"] .sondereigentum-section {
    display: flex;
    gap: 1em;
    align-items: stretch;
    padding: 0.5em 1em;
    background: var(--glass-primary);
    border-radius: 0 0 0.25em 0.25em;
    margin-top: -0.25em;
    border-bottom: 2px solid var(--glass-border);
}

body[data-page="liegenschaften"] .sondereigentum-section .floor-meta {
    width: 5em;
    border-right: 1px dashed var(--glass-border);
    padding-right: 1em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

body[data-page="liegenschaften"] .sondereigentum-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65em;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body[data-page="liegenschaften"] .sondereigentum-row {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5em, 1fr));
    gap: 0.5em;
}

/* Collapsed state when no SE units exist yet — compact single-line hint */
body[data-page="liegenschaften"] .sondereigentum-section--empty {
    padding: 0.25em 1em;
    opacity: 0.45;
    transition: opacity 0.2s ease;
}
body[data-page="liegenschaften"] .sondereigentum-section--empty:hover {
    opacity: 0.85;
}
body[data-page="liegenschaften"] .sondereigentum-section--empty .sondereigentum-row {
    grid-template-columns: auto;
}
body[data-page="liegenschaften"] .sondereigentum-section--empty .add-unit-btn {
    width: 2.5em;
    height: 2em;
    min-height: auto;
}

/* Connected unit group — wraps a main unit + its connected sondereigentum */
body[data-page="liegenschaften"] .unit-cell-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

body[data-page="liegenschaften"] .unit-cell-group .unit-cell {
    border-radius: 0.375em 0.375em 0 0;
}

body[data-page="liegenschaften"] .unit-cell-group .connected-units {
    display: flex;
    gap: 0.25em;
    padding: 0.25em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 0.375em 0.375em;
}

body[data-page="liegenschaften"] .connected-unit-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2em;
    font-size: 0.6em;
    font-weight: 500;
    padding: 0.2em 0.45em;
    border-radius: 0.2em;
    background: rgba(255, 149, 0, 0.08);
    color: var(--ios-system-orange);
    border: 1px solid rgba(255, 149, 0, 0.15);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 7em;
}

body[data-page="liegenschaften"] .connected-unit-chip:hover {
    background: rgba(255, 149, 0, 0.15);
}

body[data-page="liegenschaften"] .connected-unit-chip .radix-icon {
    font-size: 0.8em;
}

/* ============================================================
   FLOOR BAR — Improved floor label with edit action
   ============================================================ */

body[data-page="liegenschaften"] .floor-meta .floor-edit-btn {
    opacity: 0;
    padding: 0.15em;
    margin-top: 0.25em;
    font-size: 0.65em;
    color: var(--text-tertiary);
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, color 0.15s;
}

body[data-page="liegenschaften"] .floor-stack:hover .floor-edit-btn {
    opacity: 0.7;
}

body[data-page="liegenschaften"] .floor-meta .floor-edit-btn:hover {
    color: var(--ios-system-orange);
    opacity: 1;
}

/* Floor number sub-label */
body[data-page="liegenschaften"] .floor-sublabel {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6em;
    color: var(--text-tertiary);
    margin-top: 0.15em;
}

/* ============================================================
   UNIT MODAL — Unit type selector styles
   ============================================================ */

body[data-page="liegenschaften"] .unit-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6em, 1fr));
    gap: 0.4em;
}

body[data-page="liegenschaften"] .unit-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2em;
    padding: 0.5em 0.35em;
    border-radius: 0.375em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.75em;
    color: var(--text-secondary);
    text-align: center;
}

body[data-page="liegenschaften"] .unit-type-option:hover {
    background: var(--glass-hover);
    border-color: var(--text-tertiary);
}

body[data-page="liegenschaften"] .unit-type-option.selected {
    border-color: var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.08);
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .unit-type-option .radix-icon {
    font-size: 1.2em;
}

body[data-page="liegenschaften"] .unit-type-option-label {
    font-size: 0.85em;
    font-weight: 500;
    line-height: 1.2;
}

/* Linked unit picker */
body[data-page="liegenschaften"] .linked-unit-section {
    padding: 0.6em;
    border-radius: 0.375em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
}

body[data-page="liegenschaften"] .linked-unit-hint {
    font-size: 0.7em;
    color: var(--text-tertiary);
    margin-top: 0.25em;
}

/* ============================================================
   OWNERSHIP BADGE (for nav items when building is StWE/WEG)
   ============================================================ */

body[data-page="liegenschaften"] .ownership-badge {
    display: inline-block;
    font-size: 0.55em;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.1em 0.4em;
    border-radius: 0.2em;
    line-height: 1.3;
}

body[data-page="liegenschaften"] .ownership-badge--stockwerkeigentum {
    color: var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.12);
}

body[data-page="liegenschaften"] .ownership-badge--weg {
    color: var(--ios-system-purple);
    background: rgba(175, 82, 222, 0.12);
}

body[data-page="liegenschaften"] .ownership-badge--alleineigentum {
    color: var(--text-tertiary);
    background: var(--glass-primary);
}



/* ============================================================================
   NAV SEGMENTED CONTROL — 3 equal-width tabs, always readable
   ============================================================================ */

body[data-page="liegenschaften"] .nav-segmented-control {
    display: flex;
    background: var(--glass-primary);
    border-radius: 0.75em;
    padding: 0.25em;
    gap: 0.2em;
    margin-bottom: 0.75em;
}

body[data-page="liegenschaften"] .nav-segmented-control .nav-segment-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em;
    border-radius: 0.5em;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 1em;
    transition: background 0.15s, color 0.15s;
}

body[data-page="liegenschaften"] .nav-segmented-control .nav-segment-btn.active {
    background: var(--glass-secondary);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Icon size inside nav buttons */
body[data-page="liegenschaften"] .nav-segmented-control .nav-segment-btn .radix-icon {
    width: 1.125em;
    height: 1.125em;
}

/* ============================================================================
   PROPERTY ROW — Apple-quality list item
   ============================================================================ */

/* ============================================================================
   PROPERTY ROW CONTENT — Clear 3-level hierarchy: name > address > tags
   ============================================================================ */

/* Content column: stacks name, address, tags vertically */
body[data-page="liegenschaften"] .prop-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Top row: building name (primary, dominant) + unit count pill */
body[data-page="liegenschaften"] .prop-top-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5em;
    margin-bottom: 0.2em;
}

/* Level 1 — Building name: bold, primary color, clearly dominant */
body[data-page="liegenschaften"] .prop-name {
    font-size: 0.875em;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    letter-spacing: -0.01em;
}

/* Unit count — compact pill */
body[data-page="liegenschaften"] .prop-unit-pill {
    font-size: 0.65em;
    font-weight: 600;
    color: var(--text-tertiary);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 0.05em 0.5em;
    flex-shrink: 0;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
}

/* Level 2 — Address: smaller, clearly secondary/muted */
body[data-page="liegenschaften"] .prop-address {
    font-size: 0.72em;
    font-weight: 400;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    margin-bottom: 0.3em;
}

/* Level 3 — Tags row: tiny contextual pills */
body[data-page="liegenschaften"] .prop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em;
}

/* Base nav-tag — pill badge with icon + label */
body[data-page="liegenschaften"] .nav-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-size: 0.65em;
    font-weight: 600;
    padding: 0.2em 0.5em;
    border-radius: 100px;
    line-height: 1.4;
    white-space: nowrap;
    max-width: 10em;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid transparent;
}

/* Portfolio — orange */
body[data-page="liegenschaften"] .nav-tag--portfolio {
    background: rgba(255, 149, 0, 0.1);
    color: var(--ios-system-orange);
    border-color: rgba(255, 149, 0, 0.22);
}

/* Manager — indigo */
body[data-page="liegenschaften"] .nav-tag--manager {
    background: rgba(88, 86, 214, 0.1);
    color: #7B79F7;
    border-color: rgba(88, 86, 214, 0.2);
}

/* Gesellschaft — teal */
body[data-page="liegenschaften"] .nav-tag--gesellschaft {
    background: rgba(90, 200, 250, 0.1);
    color: #5AC8FA;
    border-color: rgba(90, 200, 250, 0.22);
}

/* Ownership — WEG (purple) */
body[data-page="liegenschaften"] .nav-tag--weg {
    color: #AF52DE;
    background: rgba(175, 82, 222, 0.1);
    border-color: rgba(175, 82, 222, 0.2);
}

/* Ownership — Stockwerkeigentum (amber) */
body[data-page="liegenschaften"] .nav-tag--stockwerkeigentum {
    color: var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.1);
    border-color: rgba(255, 149, 0, 0.2);
}

/* Ownership neutral fallback */
body[data-page="liegenschaften"] .nav-tag--ownership {
    background: var(--glass-primary);
    color: var(--text-secondary);
    border-color: var(--glass-border);
}

/* Icon inside nav-tag — scale down to match text */
body[data-page="liegenschaften"] .nav-tag .radix-icon {
    width: 0.85em;
    height: 0.85em;
    flex-shrink: 0;
}

/* Legacy: hide old badges class */
body[data-page="liegenschaften"] .property-row-badges {
    display: none;
}



/* ============================================================================
   PORTFOLIO VIEW — Feature 1 (2026-02-20)
   ============================================================================ */

/* Panel in matrix area */
body[data-page="liegenschaften"] .portfolio-panel {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

body[data-page="liegenschaften"] .portfolio-panel.portfolio-panel-active {
    display: flex;
}

body[data-page="liegenschaften"] .portfolio-panel-header {
    padding: 1em 1.5em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-hover);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

body[data-page="liegenschaften"] .portfolio-panel-title {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

body[data-page="liegenschaften"] .portfolio-grid {
    flex: 1;
    overflow-y: auto;
    padding: 1.25em;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
body[data-page="liegenschaften"] .pf-card {
    background: var(--glass-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg, 1.5em);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

body[data-page="liegenschaften"] .pf-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

body[data-page="liegenschaften"] .pf-card-header {
    padding: 1.125em 1.375em 0.875em;
}

body[data-page="liegenschaften"] .pf-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.625em;
    margin-bottom: 0.875em;
}

body[data-page="liegenschaften"] .pf-card-icon {
    width: 2.25em;
    height: 2.25em;
    min-width: 2.25em;
    background: var(--glass-hover);
    border-radius: 0.625em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ios-system-blue);
}

body[data-page="liegenschaften"] .pf-card-title-info {
    flex: 1;
    min-width: 0;
}

body[data-page="liegenschaften"] .pf-card-name {
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="liegenschaften"] .pf-card-owner {
    font-size: 0.75em;
    color: var(--text-tertiary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="liegenschaften"] .pf-card-header-actions {
    display: flex;
    gap: 0.25em;
    flex-shrink: 0;
}

/* ── Stats bar ────────────────────────────────────────────────────────────── */
body[data-page="liegenschaften"] .pf-stats {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 1.5em;
    align-items: center;
}

body[data-page="liegenschaften"] .pf-stat {
    display: flex;
    flex-direction: column;
    gap: 0.125em;
}

body[data-page="liegenschaften"] .pf-stat-val {
    font-size: 1.125em;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

body[data-page="liegenschaften"] .pf-stat-rent {
    font-size: 0.9375em;
}

body[data-page="liegenschaften"] .pf-stat-lbl {
    font-size: 0.625em;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

body[data-page="liegenschaften"] .pf-stat--wide {
    min-width: 0;
}

body[data-page="liegenschaften"] .pf-stat-occ {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

/* Occupancy bar */
body[data-page="liegenschaften"] .pf-occ-track {
    flex: 1;
    height: 0.3125em;
    background: var(--glass-hover);
    border-radius: 1em;
    overflow: hidden;
}

body[data-page="liegenschaften"] .pf-occ-fill {
    height: 100%;
    width: var(--pct, 0%);
    background: var(--clr, var(--ios-system-green));
    border-radius: 1em;
    transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

body[data-page="liegenschaften"] .pf-occ-label {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

/* ── Building rows ────────────────────────────────────────────────────────── */
body[data-page="liegenschaften"] .pf-buildings {
    border-top: 1px solid var(--glass-border);
}

body[data-page="liegenschaften"] .pf-buildings--collapsed {
    display: none;
}

body[data-page="liegenschaften"] .pf-building-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
    padding: 0.875em 1.375em;
    border-bottom: 1px solid var(--glass-border);
    transition: background 0.15s;
}

body[data-page="liegenschaften"] .pf-building-row:last-child {
    border-bottom: none;
}

body[data-page="liegenschaften"] .pf-building-row:hover {
    background: var(--glass-hover);
}

body[data-page="liegenschaften"] .pf-building-icon {
    width: 1.875em;
    height: 1.875em;
    min-width: 1.875em;
    margin-top: 0.125em;
    background: var(--glass-primary);
    border-radius: 0.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ios-system-orange);
    font-size: 0.875em;
}

body[data-page="liegenschaften"] .pf-building-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3125em;
}

body[data-page="liegenschaften"] .pf-building-top {
    display: flex;
    align-items: baseline;
    gap: 0.5em;
    flex-wrap: wrap;
}

body[data-page="liegenschaften"] .pf-building-name {
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .pf-building-addr {
    font-size: 0.75em;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="liegenschaften"] .pf-building-meta {
    display: flex;
    align-items: center;
    gap: 1em;
    flex-wrap: wrap;
}

body[data-page="liegenschaften"] .pf-building-stat {
    display: flex;
    align-items: center;
    gap: 0.3125em;
    font-size: 0.75em;
    color: var(--text-secondary);
}

body[data-page="liegenschaften"] .pf-building-occ {
    gap: 0.5em;
}

/* Manager chips on building row */
body[data-page="liegenschaften"] .pf-building-managers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375em;
    margin-top: 0.125em;
}

body[data-page="liegenschaften"] .pf-manager-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.1875em 0.5em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 10em;
    font-size: 0.6875em;
    color: var(--text-secondary);
}

body[data-page="liegenschaften"] .pf-no-manager {
    font-size: 0.6875em;
    color: var(--text-quaternary);
    font-style: italic;
}

body[data-page="liegenschaften"] .pf-building-actions {
    display: flex;
    gap: 0.25em;
    flex-shrink: 0;
    align-self: center;
}

/* Add building button at bottom of card */
body[data-page="liegenschaften"] .pf-btn-add-building {
    margin: 0.5em 1em 0.75em;
    width: calc(100% - 2em);
    justify-content: center;
    gap: 0.375em;
    font-size: 0.8125em;
    color: var(--text-secondary);
    border: 1px dashed var(--glass-border);
    background: transparent;
}

body[data-page="liegenschaften"] .pf-btn-add-building:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* Empty/loading states */
body[data-page="liegenschaften"] .pf-empty-buildings {
    padding: 1em 1.375em;
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

body[data-page="liegenschaften"] .pf-empty {
    text-align: center;
    padding: 3em 1.5em;
    font-size: 0.875em;
    color: var(--text-tertiary);
}

body[data-page="liegenschaften"] .pf-loading {
    text-align: center;
    padding: 2em;
    color: var(--text-tertiary);
}

body[data-page="liegenschaften"] .pf-error {
    padding: 1em 1.5em;
    color: var(--ios-system-red);
    font-size: 0.875em;
}

/* Status chips */
body[data-page="liegenschaften"] .pf-chip {
    display: inline-block;
    padding: 0.125em 0.5em;
    border-radius: 10em;
    font-size: 0.6875em;
    font-weight: 600;
}

body[data-page="liegenschaften"] .pf-chip--green {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="liegenschaften"] .pf-chip--red {
    background: rgba(255, 59, 48, 0.12);
    color: var(--ios-system-red);
}

body[data-page="liegenschaften"] .pf-chip--orange {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="liegenschaften"] .pf-chip--grey {
    background: var(--glass-primary);
    color: var(--text-tertiary);
}

/* ── Deep-view modal ──────────────────────────────────────────────────────── */
body[data-page="liegenschaften"] .pf-deepview-content {
    max-width: 42em;
    width: 90%;
}

body[data-page="liegenschaften"] .pf-deepview-body {
    display: flex;
    flex-direction: column;
    gap: 1.25em;
}

body[data-page="liegenschaften"] .pf-dv-section {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

body[data-page="liegenschaften"] .pf-dv-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body[data-page="liegenschaften"] .pf-dv-units-list {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
    max-height: 14em;
    overflow-y: auto;
}

body[data-page="liegenschaften"] .pf-dv-unit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 0.75em;
    background: var(--glass-primary);
    border-radius: 0.625em;
}

body[data-page="liegenschaften"] .pf-dv-unit-info {
    display: flex;
    flex-direction: column;
    gap: 0.0625em;
}

body[data-page="liegenschaften"] .pf-dv-unit-label {
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .pf-dv-unit-type {
    font-size: 0.6875em;
}

body[data-page="liegenschaften"] .pf-dv-unit-right {
    display: flex;
    align-items: center;
    gap: 0.625em;
}

body[data-page="liegenschaften"] .pf-dv-unit-rent {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-secondary);
}

body[data-page="liegenschaften"] .pf-dv-empty {
    padding: 0.75em;
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

body[data-page="liegenschaften"] .pf-dv-managers {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

body[data-page="liegenschaften"] .pf-dv-manager-row {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.75em;
    background: var(--glass-primary);
    border-radius: 0.625em;
    font-size: 0.8125em;
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .pf-dv-manager-add {
    display: flex;
    gap: 0.5em;
    align-items: center;
    margin-top: 0.375em;
}

body[data-page="liegenschaften"] .pf-dv-manager-add select {
    flex: 1;
}

body[data-page="liegenschaften"] .pf-hidden {
    display: none;
}

/* ── Assign modal – building toggle rows ─────────────────────────────────── */

body[data-page="liegenschaften"] .pf-assign-modal-content {
    max-width: 38em;
}

body[data-page="liegenschaften"] .pf-assign-subtitle {
    margin-top: 0.25em;
    font-size: 0.75em;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    opacity: 0.55;
}

body[data-page="liegenschaften"] .pf-building-chips {
    display: flex;
    flex-direction: column;
    gap: 0.625em;
    max-height: 22em;
    overflow-y: auto;
    padding: 0.25em 0.125em;
    /* subtle scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

body[data-page="liegenschaften"] .pf-building-chips::-webkit-scrollbar {
    width: 4px;
}
body[data-page="liegenschaften"] .pf-building-chips::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

/* ── Each building row ── */
body[data-page="liegenschaften"] button.pf-building-chip {
    /* Reset button defaults */
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-size: 0.9em;
    /* Row layout */
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75em;
    width: 100%;
    padding: 0.75em 0.875em;
    border-radius: 0.875em;
    border: 1.5px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

body[data-page="liegenschaften"] button.pf-building-chip:hover {
    background: var(--glass-hover);
    border-color: color-mix(in srgb, var(--ios-system-orange) 35%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--ios-system-orange) 15%, transparent);
}

body[data-page="liegenschaften"] button.pf-building-chip.pf-building-chip--on {
    background: color-mix(in srgb, var(--ios-system-orange) 10%, transparent);
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--ios-system-orange) 20%, transparent);
}

body[data-page="liegenschaften"] button.pf-building-chip.pf-building-chip--on:hover {
    background: color-mix(in srgb, var(--ios-system-orange) 18%, transparent);
}

/* Icon bubble */
body[data-page="liegenschaften"] button.pf-building-chip .pf-chip-icon {
    flex-shrink: 0;
    width: 2.25em;
    height: 2.25em;
    border-radius: 0.625em;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 1em;
}

body[data-page="liegenschaften"] button.pf-building-chip.pf-building-chip--on .pf-chip-icon {
    background: color-mix(in srgb, var(--ios-system-orange) 18%, transparent);
    color: var(--ios-system-orange);
}

/* Text block */
body[data-page="liegenschaften"] button.pf-building-chip .pf-chip-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1em;
}

body[data-page="liegenschaften"] button.pf-building-chip .pf-chip-name {
    font-weight: 600;
    font-size: 0.95em;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

body[data-page="liegenschaften"] button.pf-building-chip .pf-chip-meta {
    font-size: 0.78em;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Other-portfolio badge */
body[data-page="liegenschaften"] button.pf-building-chip .pf-chip-other-badge {
    flex-shrink: 0;
    font-size: 0.72em;
    padding: 0.2em 0.55em;
    border-radius: 1em;
    background: color-mix(in srgb, var(--ios-system-orange) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--ios-system-orange) 35%, transparent);
    color: var(--ios-system-orange);
    white-space: nowrap;
}

/* Toggle circle on the right */
body[data-page="liegenschaften"] button.pf-building-chip .pf-chip-toggle {
    flex-shrink: 0;
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 700;
    color: transparent;
    background: transparent;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    line-height: 1;
}

body[data-page="liegenschaften"] button.pf-building-chip.pf-building-chip--on .pf-chip-toggle {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

/* Portfolio-level manager chips row (shown between stats and buildings list) */
body[data-page="liegenschaften"] .pf-portfolio-managers-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375em;
    padding: 0.5em 1em;
    border-bottom: 1px solid var(--glass-border);
}

/* Responsive */
@media (max-width: 48em) {
    body[data-page="liegenschaften"] .pf-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.75em;
    }
}


/**
 * @file vendor-welcome.css
 * @description Styles for the vendor onboarding welcome page (vendor-welcome.html)
 * @version 2.0.0
 * @created 2026-02-05
 * @updated 2026-02-05 - Widened card to 56.25em, added two-column layouts,
 *                        updated step indicators for 5-6 step flow,
 *                        added category tag-select, fixed select/textarea backgrounds,
 *                        constrained navigation buttons to max-width 28em
 *
 * DEPENDENCIES:
 * - core/variables-v2.css (CSS variables)
 * - core/glass-system-v2.css (glass components)
 * - core/themes-v2.css (theme support)
 * - components/login.css (login-container, login-card base)
 *
 * EXPORTS:
 * - Vendor-welcome card width override (no !important)
 * - Two-column form layouts (.vendor-form-row)
 * - Category checkbox grid
 * - Language checkbox grid
 * - Toggle switch component
 * - Logo preview container
 * - Signature canvas
 * - Service radius slider
 * - Step indicators (5-6 steps)
 *
 * SCOPING:
 * All rules scoped to body[data-page="vendor-welcome"]
 */

/* ============================================ */
/*          CARD WIDTH OVERRIDE                 */
/* ============================================ */

/**
 * Override .login-card--wide max-width for vendor-welcome.
 * Uses body[data-page] + class specificity (0,2,0) to beat
 * the base .login-card--wide (0,1,0) without !important.
 * Widened to 56.25em (900px) to use more page width.
 */
body[data-page="vendor-welcome"] {
    overflow-x: hidden;
    overflow-y: scroll;
    height: auto;
    min-height: 100vh;
    /* Re-enable trackpad/touch scrolling (overrides fouc-prevention.css + themes-v2.css) */
    overscroll-behavior: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
}

body[data-page="vendor-welcome"] .login-card--wide {
    max-width: 56.25em; /* 900px */
}

/**
 * Allow scrolling on the login container for vendor-welcome
 * since the multi-step form can be taller than the viewport.
 */
body[data-page="vendor-welcome"] .login-container {
    overflow-y: auto;
    padding-top: 2em;
    padding-bottom: 2em;
    overscroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================ */
/*          FORM ALIGNMENT                      */
/* ============================================ */

/**
 * Left-align form labels for multi-field vendor forms.
 * The login.css base centers labels, but vendor forms
 * have many fields where left-alignment is more readable.
 */
body[data-page="vendor-welcome"] .form-group {
    text-align: left;
}

body[data-page="vendor-welcome"] .form-group h2,
body[data-page="vendor-welcome"] .form-group p {
    text-align: center;
}

body[data-page="vendor-welcome"] .form-input {
    text-align: left;
}

body[data-page="vendor-welcome"] .form-input::placeholder {
    text-align: left;
}

/**
 * Fix <select> elements which lose glass background due to
 * browser defaults. Force them to match .form-input styling.
 */
body[data-page="vendor-welcome"] select.form-input {
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75em center;
    padding-right: 2.5em;
}

body[data-page="vendor-welcome"] select.form-input option {
    background: #1a1a2e;
    color: #e0e0e0;
}

/**
 * Fix <textarea> elements which lose glass background
 * due to browser defaults, same as <select>.
 */
body[data-page="vendor-welcome"] textarea.form-input {
    background-color: rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    resize: vertical;
}

/* ============================================ */
/*          TWO-COLUMN FORM LAYOUT             */
/* ============================================ */

/**
 * Two-column row for side-by-side form fields.
 * Falls back to single column on narrow screens.
 */
body[data-page="vendor-welcome"] .vendor-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    align-items: start;
}

/**
 * Full-width form group inside a row (spans both columns).
 */
body[data-page="vendor-welcome"] .vendor-form-full {
    grid-column: 1 / -1;
}

/* ============================================ */
/*          LOGO PREVIEW                        */
/* ============================================ */

body[data-page="vendor-welcome"] .logo-preview-container {
    width: 6.25em;  /* 100px */
    height: 4.375em; /* 70px */
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-primary);
    flex-shrink: 0;
}

body[data-page="vendor-welcome"] .logo-preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none;
}

body[data-page="vendor-welcome"] .logo-preview-image.visible {
    display: block;
}

body[data-page="vendor-welcome"] .logo-preview-image.visible + div {
    display: none;
}

/* ============================================ */
/*          SIGNATURE CANVAS                    */
/* ============================================ */

body[data-page="vendor-welcome"] .signature-canvas {
    touch-action: none;
    background: var(--glass-primary);
    height: 9.375em; /* 150px */
}

/* ============================================ */
/*          BRANDING SECTION LAYOUT            */
/* ============================================ */

/**
 * Side-by-side layout for logo and signature on branding step.
 */
body[data-page="vendor-welcome"] .vendor-branding-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
    align-items: start;
}

/* ============================================ */
/*          CATEGORY TAG-SELECT                 */
/* ============================================ */

/**
 * Container for the multi-select tag input.
 * Acts like a form-input but wraps tags + input.
 */
body[data-page="vendor-welcome"] .category-select {
    position: relative;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 0.75em;
    cursor: text;
    transition: border-color 0.2s ease;
}

body[data-page="vendor-welcome"] .category-select:focus-within {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/** Tags wrap area */
body[data-page="vendor-welcome"] .category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 0.5em;
}

/** Hide margin when no tags are present */
body[data-page="vendor-welcome"] .category-tags:empty {
    margin-bottom: 0;
}

/** Individual tag chip */
body[data-page="vendor-welcome"] .category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.625em;
    background: var(--glass-secondary);
    border: 1px solid var(--ios-system-orange);
    border-radius: 1em;
    font-size: 0.8125em;
    color: var(--text-primary);
    white-space: nowrap;
    animation: vendorStepFadeIn 0.15s ease;
}

/** Custom (user-created) category tag */
body[data-page="vendor-welcome"] .category-tag--custom {
    border-color: #f97316;
    border-style: dashed;
}

/** Tag remove button */
body[data-page="vendor-welcome"] .category-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    width: 1em;
    height: 1em;
    transition: color 0.15s ease;
}

body[data-page="vendor-welcome"] .category-tag-remove:hover {
    color: var(--ios-system-red);
}

/** Inline search input inside the tag container */
body[data-page="vendor-welcome"] .category-input {
    flex: 1;
    min-width: 10em;
    padding: 0.375em 0.5em;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.875em;
    -webkit-text-fill-color: var(--text-primary);
}

body[data-page="vendor-welcome"] .category-input::placeholder {
    color: var(--text-tertiary);
    -webkit-text-fill-color: var(--text-tertiary);
}

/** Dropdown list below the input */
body[data-page="vendor-welcome"] .category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    margin-top: 0.375em;
    max-height: 18em;
    overflow-y: auto;
    background: rgba(20, 20, 40, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 0.25em 0;
    backdrop-filter: blur(1.5em);
    -webkit-backdrop-filter: blur(1.5em);
}

body[data-page="vendor-welcome"] .category-dropdown-item {
    padding: 0.75em 1em;
    cursor: pointer;
    font-size: 0.875em;
    color: var(--text-primary);
    transition: background 0.15s ease;
}

body[data-page="vendor-welcome"] .category-dropdown-item:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-welcome"] .category-dropdown-item:first-child {
    border-radius: 0.75em 0.75em 0 0;
}

body[data-page="vendor-welcome"] .category-dropdown-item:last-child {
    border-radius: 0 0 0.75em 0.75em;
}

/** "Create new" option in dropdown */
body[data-page="vendor-welcome"] .category-dropdown-create {
    display: flex;
    align-items: center;
    gap: 0.375em;
    color: #f97316;
    border-top: 1px solid var(--glass-border);
}

/** Empty state in dropdown */
body[data-page="vendor-welcome"] .category-dropdown-empty {
    padding: 0.625em 0.75em;
    font-size: 0.8125em;
    color: var(--text-tertiary);
    text-align: center;
}

/* ============================================ */
/*          LANGUAGE CHECKBOX GRID              */
/* ============================================ */

body[data-page="vendor-welcome"] .language-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}

body[data-page="vendor-welcome"] .language-checkbox {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-page="vendor-welcome"] .language-checkbox:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-welcome"] .language-checkbox input[type="checkbox"] {
    width: 0.875em;
    height: 0.875em;
    accent-color: var(--ios-system-orange);
}

body[data-page="vendor-welcome"] .language-checkbox.selected {
    background: var(--glass-secondary);
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-welcome"] .language-checkbox label {
    cursor: pointer;
    font-size: 0.8125em;
    color: var(--text-primary);
}

/* ============================================ */
/*          SERVICE RADIUS SLIDER               */
/* ============================================ */

body[data-page="vendor-welcome"] .radius-slider {
    width: 100%;
    accent-color: var(--ios-system-orange);
}

body[data-page="vendor-welcome"] .radius-value {
    font-weight: 600;
    color: var(--ios-system-orange);
}

/* ============================================ */
/*          TOGGLE SWITCH                       */
/* ============================================ */

body[data-page="vendor-welcome"] .toggle-switch {
    position: relative;
    width: 3em;    /* 48px */
    height: 1.75em; /* 28px */
    flex-shrink: 0;
}

body[data-page="vendor-welcome"] .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

body[data-page="vendor-welcome"] .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--glass-secondary);
    transition: 0.3s;
    border-radius: 1.75em;
}

body[data-page="vendor-welcome"] .toggle-slider::before {
    position: absolute;
    content: "";
    height: 1.375em; /* 22px */
    width: 1.375em;
    left: 0.1875em; /* 3px */
    bottom: 0.1875em;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

body[data-page="vendor-welcome"] .toggle-switch input:checked + .toggle-slider {
    background-color: var(--ios-system-green);
}

body[data-page="vendor-welcome"] .toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(1.25em); /* 20px */
}

/* ============================================ */
/*          NAVIGATION BUTTONS                  */
/* ============================================ */

/**
 * Constrain navigation button row within forms.
 * Buttons should not stretch beyond a comfortable width.
 * Center the button row if the card is wide.
 */
body[data-page="vendor-welcome"] form > .flex.mt-lg {
    max-width: 28em; /* ~448px - comfortable button width */
    margin-left: auto;
    margin-right: auto;
}

/**
 * Also constrain the full-width single button (Step 1 "Weiter").
 */
body[data-page="vendor-welcome"] .glass-button.btn-full-width {
    max-width: 28em;
    margin-left: auto;
    margin-right: auto;
    display: flex;
}

/* ============================================ */
/*          ADDRESS ROW LAYOUT                  */
/* ============================================ */

body[data-page="vendor-welcome"] .vendor-zip-input {
    flex: 0 0 30%;
}

body[data-page="vendor-welcome"] .vendor-footer {
    max-width: 37.5em; /* 600px - wider to match card */
}

/* ============================================ */
/*          EMPLOYEE ENTRY                      */
/* ============================================ */

body[data-page="vendor-welcome"] .employee-entry {
    transition: all 0.2s ease;
}

body[data-page="vendor-welcome"] .employee-entry .form-group {
    margin-bottom: 0.75em;
}

body[data-page="vendor-welcome"] .employee-entry .form-group:last-child {
    margin-bottom: 0;
}

/* ============================================ */
/*          RESPONSIVE                          */
/* ============================================ */

@media (max-width: 56.25em) { /* 900px - match card max-width */
    body[data-page="vendor-welcome"] .vendor-form-row {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-welcome"] .vendor-branding-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-welcome"] .step-connector {
        width: 1em;
    }

    body[data-page="vendor-welcome"] .step-label {
        font-size: 0.625em;
    }
}

@media (max-width: 30em) { /* 480px */
    body[data-page="vendor-welcome"] .login-card--wide {
        max-width: 100%;
    }

    body[data-page="vendor-welcome"] .step-label {
        display: none;
    }
}

/* ============================================ */
/*          STEP INDICATORS                     */
/* ============================================ */

body[data-page="vendor-welcome"] .step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25em;
}

body[data-page="vendor-welcome"] .step-number {
    width: 2em;
    height: 2em;
    border-radius: 50%;
    background: var(--glass-primary);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

body[data-page="vendor-welcome"] .step-label {
    font-size: 0.6875em; /* slightly smaller for 5-6 steps */
    color: var(--text-tertiary);
    transition: color 0.3s ease;
    white-space: nowrap;
}

body[data-page="vendor-welcome"] .step-indicator.active .step-number {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    border-color: #f97316;
    color: var(--button-text-on-color);
}

body[data-page="vendor-welcome"] .step-indicator.active .step-label {
    color: var(--text-primary);
}

body[data-page="vendor-welcome"] .step-indicator.completed .step-number {
    background: var(--ios-system-green);
    border-color: var(--ios-system-green);
    color: var(--button-text-on-color);
}

body[data-page="vendor-welcome"] .step-indicator.completed .step-label {
    color: var(--text-secondary);
}

body[data-page="vendor-welcome"] .step-connector {
    width: 1.5em;
    height: 2px;
    background: var(--glass-border);
    align-self: center;
    margin-top: -1em; /* Align with step-number center */
    flex-shrink: 0;
}

/* ============================================ */
/*          STEP CONTENT ANIMATION             */
/* ============================================ */

body[data-page="vendor-welcome"] .step-content {
    display: none;
}

body[data-page="vendor-welcome"] .step-content.active {
    display: block;
    animation: vendorStepFadeIn 0.3s ease;
}

@keyframes vendorStepFadeIn {
    from {
        opacity: 0;
        transform: translateY(0.5em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/**
 * @file vendor-dashboard.css
 * @filepath public/css/pages/vendor-dashboard.css
 * @description Styles for vendor marketplace dashboard
 * @created 2025-12-16
 *
 * <file_documentation>
 *   <purpose>
 *     Styling for vendor dashboard page including statistics cards,
 *     conversations list, subscription status, and chat modal.
 *   </purpose>
 *   <theme_support>All 5 themes via CSS variables</theme_support>
 * </file_documentation>
 */

/* ============================================================================
   VENDOR PAGE SCROLL FIX
   ============================================================================ */

body[data-page="vendor-dashboard"] {
    overflow-x: hidden;
    overflow-y: scroll;
    height: auto;
    min-height: 100vh;
    /* Re-enable trackpad/touch scrolling (overrides fouc-prevention.css + themes-v2.css) */
    overscroll-behavior: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
}

body[data-page="vendor-dashboard"] .app-container {
    min-height: 100vh;
    height: auto;
    overflow-y: visible;
    overscroll-behavior: auto;
}

/* ============================================================================
   VENDOR PAGE CONTAINER
   ============================================================================ */

.vendor-page-container {
    padding: 3rem 1rem;
    max-width: 95vw;
    margin: 0 auto;
}

/* Higher specificity for vendor dashboard page */
body[data-page="vendor-dashboard"] .vendor-page-container {
    max-width: 95vw;
    width: 95vw;
}

/* ============================================================================
   VENDOR PROFILE BANNER
   ============================================================================ */

.vendor-profile-banner {
    position: relative;
    text-align: center;
}

.vendor-banner-image {
    height: 120px;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.3) 0%,
        rgba(168, 85, 247, 0.2) 50%,
        rgba(236, 72, 153, 0.15) 100%);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
}

.vendor-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--glass-secondary);
    border: 4px solid var(--glass-primary);
    margin: -50px auto 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.vendor-avatar-placeholder {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.vendor-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vendor-profile-name {
    margin-top: var(--spacing-md);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.vendor-profile-subtitle {
    margin-top: 0.25em;
    color: var(--text-secondary);
}

/* Increase padding inside dashboard cards */
.vendor-dashboard .glass-card {
    padding: var(--spacing-xl);
}

/* Section titles with proper spacing */
.vendor-dashboard .section-title {
    margin-bottom: var(--spacing-lg);
}

/* Conversation filters spacing */
.vendor-dashboard .conversation-filters {
    margin-bottom: var(--spacing-lg);
}

/* Quick actions grid spacing */
.vendor-dashboard .quick-actions-grid {
    margin-top: var(--spacing-md);
}

/* ============================================================================
   VENDOR DASHBOARD LAYOUT
   ============================================================================ */

.vendor-dashboard {
    display: grid;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
}

@media (min-width: 64em) {
    .vendor-dashboard {
        grid-template-columns: 1fr 1.6fr;
        grid-template-rows: auto auto 1fr;
    }

    .vendor-stats-section {
        grid-column: 1 / -1;
    }

    .vendor-conversations-section {
        grid-column: 1;
        grid-row: 2 / 4;
    }

    .vendor-sidebar-section {
        grid-column: 2;
        grid-row: 2 / 4;
        display: flex;
        flex-direction: column;
        gap: var(--spacing-lg);
    }
}

/* ============================================================================
   STATISTICS CARDS
   ============================================================================ */

.vendor-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12em, 1fr));
    gap: var(--spacing-md);
}

.vendor-stat-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-lg);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(var(--blur-md));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* No hover effect on base stat cards */

.vendor-stat-icon {
    width: 2.5em;
    height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.vendor-stat-icon svg {
    width: 1.25em;
    height: 1.25em;
}

.vendor-stat-value {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.vendor-stat-label {
    font-size: 0.875em;
    color: var(--text-secondary);
}

/* 3-column grid variant */
.vendor-stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 64em) {
    .vendor-stats-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 40em) {
    .vendor-stats-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Clickable stat card link */
a.vendor-stat-card-link {
    text-decoration: none;
    cursor: pointer;
}

a.vendor-stat-card-link:hover {
    border-color: var(--glass-border-hover);
}

/* Conversation Filters */
.conversation-filters {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: var(--spacing-xs);
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    padding: 2px;
}

.filter-tab {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8125em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    color: var(--text-primary);
}

.filter-tab.active {
    background: var(--glass-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.filter-search {
    flex: 1;
    min-width: 120px;
}

.filter-search-input {
    width: 100%;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8125em;
}

.filter-search-input::placeholder {
    color: var(--text-tertiary);
}

.filter-search-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

/* ============================================================================
   CONVERSATIONS LIST
   ============================================================================ */

.vendor-conversations-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-height: 32em;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.conversation-item:hover {
    border-color: var(--glass-border-hover);
}

.conversation-item.unread {
    border-left: 3px solid var(--ios-system-orange);
}

.conversation-avatar {
    width: 3em;
    height: 3em;
    border-radius: 50%;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.conversation-content {
    flex: 1;
    min-width: 0;
}

.conversation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.conversation-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 0.75em;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.conversation-preview {
    font-size: 0.875em;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-context {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
    font-size: 0.75em;
    color: var(--text-tertiary);
}

.conversation-unread-badge {
    background: var(--ios-system-orange);
    color: var(--text-primary);
    font-size: 0.75em;
    padding: 0.125em 0.5em;
    border-radius: 1em;
    font-weight: 600;
}

.conversation-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-tertiary);
}

.conversation-empty svg {
    width: 3em;
    height: 3em;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

/* ============================================================================
   SUBSCRIPTION CARD
   ============================================================================ */

.subscription-card {
    padding: var(--spacing-lg);
}

.subscription-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.subscription-status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    font-size: 0.875em;
    font-weight: 500;
}

.subscription-status-badge.active {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

.subscription-status-badge.inactive {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

.subscription-status-badge.canceled {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

.subscription-pricing {
    display: grid;
    gap: var(--spacing-sm);
}

.pricing-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.pricing-option:hover {
    border-color: var(--ios-system-orange);
}

.pricing-option.selected {
    border-color: var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.08);
}

.pricing-option-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xxs);
}

.pricing-option-name {
    font-weight: 600;
    color: var(--text-primary);
}

.pricing-option-price {
    font-size: 0.875em;
    color: var(--text-secondary);
}

.pricing-option-discount {
    font-size: 0.75em;
    padding: 0.125em 0.5em;
    background: var(--ios-system-green);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* ============================================================================
   QUICK ACTIONS
   ============================================================================ */

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-md);
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--spacing-sm) 2px;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    color: var(--text-primary);
    text-decoration: none;
}

.quick-action-btn:hover {
    border-color: var(--glass-border-hover);
}

.quick-action-btn svg {
    width: 1.5em;
    height: 1.5em;
}

.quick-action-btn span {
    font-size: 0.75em;
    text-align: center;
}

.quick-action-logout {
    color: var(--ios-system-red);
}

.quick-action-logout:hover {
    border-color: var(--ios-system-red);
}

/* ============================================================================
   PROFILE COMPLETENESS
   ============================================================================ */

.profile-completeness {
    padding: var(--spacing-lg);
}

.completeness-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.completeness-percentage {
    font-weight: 700;
    color: var(--ios-system-orange);
}

.completeness-bar {
    height: 0.5em;
    background: var(--glass-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.completeness-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ios-system-orange), var(--ios-system-green));
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.completeness-checklist {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875em;
}

.checklist-item.completed {
    color: var(--text-tertiary);
    text-decoration: line-through;
}

.checklist-item svg {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

.checklist-item.completed svg {
    color: var(--ios-system-green);
}

.checklist-item:not(.completed) svg {
    color: var(--text-quaternary);
}

/* ============================================================================
   CHAT MODAL
   ============================================================================ */

.chat-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.chat-modal.open {
    display: flex;
}

.chat-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.chat-modal-content {
    position: relative;
    width: 100%;
    max-width: 40em;
    height: 80vh;
    max-height: 40em;
    display: flex;
    flex-direction: column;
    background: var(--glass-thick);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.chat-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
}

.chat-modal-title {
    font-weight: 600;
    color: var(--text-primary);
}

.chat-modal-close {
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.2s ease;
}

.chat-modal-close:hover {
    background: var(--glass-hover);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.chat-message {
    max-width: 80%;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
}

.chat-message.sent {
    align-self: flex-end;
    background: var(--ios-system-orange);
    color: var(--text-primary);
    border-bottom-right-radius: var(--radius-sm);
}

.chat-message.received {
    align-self: flex-start;
    background: var(--glass-secondary);
    color: var(--text-primary);
    border-bottom-left-radius: var(--radius-sm);
}

.chat-message-content {
    word-wrap: break-word;
}

.chat-message-time {
    font-size: 0.625em;
    opacity: 0.7;
    margin-top: var(--spacing-xxs);
    text-align: right;
}

.chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--glass-border);
}

.chat-input {
    flex: 1;
    padding: var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    resize: none;
    min-height: 4em;
    max-height: 12em;
    line-height: 1.5;
    font-size: 1em;
}

.chat-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

.chat-send-btn {
    width: 2.5em;
    height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ios-system-orange);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-primary);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Chat Attachment Button */
.chat-attachment-btn {
    width: 2.5em;
    height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.chat-attachment-btn:hover {
    color: var(--text-primary);
    border-color: var(--glass-border-hover);
}

.chat-attachment-btn svg {
    width: 1.25em;
    height: 1.25em;
}

/* Chat Attachment Preview */
.chat-attachment-preview {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    max-height: 10em;
    overflow-y: auto;
}

.chat-attachment-preview.hidden {
    display: none;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--glass-secondary);
    border-radius: var(--radius-sm);
}

.attachment-item-icon {
    width: 1.5em;
    height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.attachment-item-info {
    flex: 1;
    min-width: 0;
}

.attachment-item-name {
    font-size: 0.875em;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-item-size {
    font-size: 0.75em;
    color: var(--text-tertiary);
}

.attachment-item-remove {
    width: 1.5em;
    height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.attachment-item-remove:hover {
    color: var(--ios-system-red);
}

/* Message Attachment Display */
.message-attachments {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
}

.message-attachment {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--glass-primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.875em;
    transition: background 0.2s ease;
}

.message-attachment:hover {
    background: var(--glass-hover);
}

.message-attachment-icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

.message-attachment-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================================
   VENDOR HEADER
   ============================================================================ */

.vendor-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.vendor-logo {
    width: 5em;
    height: 5em;
    border-radius: var(--radius-lg);
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vendor-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vendor-logo-placeholder {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-secondary);
}

.vendor-info h1 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.vendor-status-badges {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.vendor-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xxs);
    padding: var(--spacing-xxs) var(--spacing-sm);
    border-radius: var(--radius-full);
    font-size: 0.75em;
    font-weight: 500;
}

.vendor-badge.active {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

.vendor-badge.verified {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

.vendor-badge.inactive {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

/* ============================================================================
   HEADER MESSAGES ICON
   ============================================================================ */

.messages-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.messages-icon-btn svg {
    flex-shrink: 0;
}

.messages-badge {
    position: absolute;
    top: -0.25em;
    right: -0.25em;
    min-width: 1.25em;
    height: 1.25em;
    padding: 0 0.35em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1.25em;
    text-align: center;
    color: var(--text-primary);
    background: var(--ios-system-red);
    border-radius: 0.625em;
}

.messages-badge.hidden {
    display: none;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 48em) {
    .vendor-header {
        flex-direction: column;
        text-align: center;
    }

    .vendor-status-badges {
        justify-content: center;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .chat-modal-content {
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }
}

/* ============================================================================
   CHAT INPUT AREA ENHANCED
   ============================================================================ */

.chat-input-area {
    flex-direction: column;
    gap: var(--spacing-sm);
}

.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-sm);
    width: 100%;
}

.chat-input-row .chat-input {
    flex: 1;
}

.chat-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.chat-actions .glass-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* ============================================================================
   QUOTE BUILDER MODAL
   ============================================================================ */

#quoteBuilderModal.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

#quoteBuilderModal.modal-overlay.hidden {
    display: none !important;
}

.quote-builder-modal {
    width: 100%;
    max-width: 42em;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: var(--radius-xl);
    padding: 0;
}

.quote-builder-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    background: var(--glass-thick);
    z-index: 10;
}

.quote-builder-form {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Quote Sections */
.quote-section {
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--glass-border);
}

.quote-section:last-of-type {
    border-bottom: none;
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.form-label {
    font-size: 0.875em;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--input-bg, var(--glass-primary));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375em;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input-sm {
    width: 8em;
}

.form-row {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.form-row > .form-group {
    flex: 1;
    min-width: 10em;
}

.form-checkbox {
    width: 1.25em;
    height: 1.25em;
    accent-color: var(--ios-system-orange);
}

/* Quote Items List */
.quote-items-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.quote-item-editor {
    padding: var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.quote-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.quote-item-number {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875em;
}

.quote-item-remove {
    color: var(--ios-system-red);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.quote-item-remove:hover {
    opacity: 1;
}

.quote-item-editor .form-row {
    align-items: flex-end;
}

.quote-item-editor .form-group {
    margin-bottom: 0;
}

.item-quantity-group {
    max-width: 6em;
}

.item-unit-group {
    max-width: 6em;
}

.item-total {
    margin-left: auto;
}

.item-total-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Quote Pricing Preview */
.quote-pricing-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.quote-pricing-row .form-label {
    margin-bottom: 0;
}

.quote-totals-preview {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.quote-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
    font-size: 0.9375em;
    color: var(--text-secondary);
}

.quote-total-row.mwst {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.quote-total-row.total {
    font-weight: 600;
    font-size: 1.125em;
    color: var(--ios-system-green);
}

/* Quote Actions */
.quote-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--glass-border);
}

.quote-actions-row .glass-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.btn-primary {
    background: var(--ios-system-orange) !important;
    color: var(--text-primary) !important;
    border: none !important;
}

.btn-primary:hover {
    background: var(--ios-system-orange-dark, #CC7700) !important;
}

/* Quote Builder Responsive */
@media (max-width: 48em) {
    .quote-builder-modal {
        max-height: 100vh;
        border-radius: 0;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row > .form-group {
        min-width: 100%;
    }

    .quote-actions-row {
        flex-direction: column;
    }

    .quote-actions-row .glass-button {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================================
   MINI CALENDAR
   ============================================================================ */

.mini-calendar-section {
    flex: 1;
}

.mini-calendar {
    margin-bottom: var(--spacing-md);
}

.mini-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.mini-calendar-month {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
}

.mini-calendar-nav {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs);
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.mini-calendar-nav:hover {
    border-color: var(--glass-border-hover);
}

.mini-calendar-nav .radix-icon,
.mini-calendar-nav svg {
    color: var(--text-primary);
    fill: currentColor;
    width: 16px;
    height: 16px;
}

.mini-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: var(--spacing-xs);
}

.mini-calendar-weekdays span {
    text-align: center;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--text-tertiary);
    padding: var(--spacing-xs) 0;
}

.mini-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.mini-calendar-day {
    min-height: 4.5em;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 2px;
    font-size: 0.9em;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
    overflow: hidden;
}

.mini-calendar-day .day-number {
    text-align: center;
    padding: 2px 0;
    font-weight: 500;
}

/* No hover effect on calendar days */

.mini-calendar-day.other-month {
    color: var(--text-quaternary);
}

.mini-calendar-day.today {
    background: var(--ios-system-orange);
    color: var(--text-primary);
}

.mini-calendar-day.today .day-number {
    font-weight: 700;
}

/* Multi-event support */
.mini-calendar-day.has-events {
    background: var(--glass-primary);
}

/* Event titles in mini calendar */
.mini-calendar-day .event-titles {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    overflow: hidden;
}

.mini-calendar-day .event-title-mini {
    display: block;
    font-size: 0.7em;
    line-height: 1.3;
    padding: 2px 3px;
    border-radius: 2px;
    color: var(--button-text-on-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.mini-calendar-day .event-more-indicator {
    font-size: 0.7em;
    color: var(--text-tertiary);
    text-align: center;
    line-height: 1.2;
    padding-top: 1px;
}

.mini-calendar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: background 0.2s ease;
}

.mini-calendar-link:hover {
    border-color: var(--glass-border-hover);
}

/* ========================================
   Day Events Popup
   ======================================== */

.day-events-popup {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.day-events-popup.hidden {
    display: none;
}

.day-events-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.day-events-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    padding: var(--spacing-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.day-events-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--glass-border);
}

.day-events-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.day-event-item {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--glass-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

.day-event-item .event-color-bar {
    width: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

.day-event-item .event-details {
    flex: 1;
    min-width: 0;
}

.day-event-item .event-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-event-item .event-time {
    margin-top: 2px;
}

.day-event-item .event-calendar {
    margin-top: 2px;
}

.day-events-empty {
    padding: var(--spacing-xl);
    text-align: center;
}

/* ========================================
   Calendar Actions
   ======================================== */

.calendar-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.calendar-actions .mini-calendar-link {
    flex: 1;
}

.calendar-create-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
}

/* ========================================
   Create Event Modal
   ======================================== */

.create-event-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.create-event-modal.hidden {
    display: none;
}

.create-event-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.create-event-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.create-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--glass-border);
}

.create-event-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.create-event-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.create-event-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.create-event-form .form-input {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.create-event-form .form-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

.create-event-form textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.create-event-form .form-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--glass-border);
}

.create-event-form .glass-button.primary {
    background: var(--ios-system-orange);
    color: var(--text-primary);
}

/* ======================
   CALENDAR SECTION HEADER
   ====================== */
.calendar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.calendar-section-header .expand-btn {
    opacity: 0.7;
}

.calendar-section-header .expand-btn:hover {
    opacity: 1;
}

/* ======================
   FULL CALENDAR MODAL
   ====================== */
.full-calendar-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-calendar-modal.hidden {
    display: none;
}

.full-calendar-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.full-calendar-content {
    position: relative;
    width: 95vw;
    max-width: 1400px;
    height: 90vh;
    max-height: 900px;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-lg);
    overflow: hidden;
}

.full-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--glass-border);
}

.full-calendar-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.full-calendar-container {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

/* FullCalendar Theme Overrides */
.full-calendar-container .fc {
    height: 100%;
    font-family: var(--font-sans);
}

.full-calendar-container .fc-theme-standard {
    --fc-border-color: var(--glass-border);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: var(--glass-primary);
    --fc-list-event-hover-bg-color: var(--glass-hover);
}

.full-calendar-container .fc-toolbar-title {
    color: var(--text-primary);
    font-size: 1.25em;
}

.full-calendar-container .fc-button {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5em 1em;
    border-radius: var(--radius-sm);
}

.full-calendar-container .fc-button:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border);
}

.full-calendar-container .fc-button:focus {
    box-shadow: none;
}

.full-calendar-container .fc-button-active {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
    color: var(--text-primary);
}

.full-calendar-container .fc-button-active:hover {
    background: var(--ios-system-orange);
    opacity: 0.9;
}

.full-calendar-container .fc-col-header-cell {
    background: var(--glass-primary);
}

.full-calendar-container .fc-col-header-cell-cushion {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.75em 0;
}

.full-calendar-container .fc-daygrid-day {
    background: transparent;
}

.full-calendar-container .fc-daygrid-day:hover {
    background: var(--glass-primary);
}

.full-calendar-container .fc-daygrid-day-number {
    color: var(--text-primary);
    padding: 0.5em;
}

.full-calendar-container .fc-day-today {
    background: rgba(255, 149, 0, 0.1);
}

.full-calendar-container .fc-day-today .fc-daygrid-day-number {
    background: var(--ios-system-orange);
    color: var(--text-primary);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-calendar-container .fc-event {
    border-radius: var(--radius-sm);
    border: none;
    padding: 2px 4px;
    font-size: 0.85em;
    cursor: pointer;
}

.full-calendar-container .fc-event:hover {
    opacity: 0.9;
}

.full-calendar-container .fc-event-title {
    font-weight: 500;
}

.full-calendar-container .fc-timegrid-slot {
    height: 3em;
}

.full-calendar-container .fc-timegrid-slot-label {
    color: var(--text-tertiary);
    font-size: 0.75em;
}

.full-calendar-container .fc-list-event {
    background: var(--glass-primary);
}

.full-calendar-container .fc-list-event:hover td {
    background: var(--glass-hover);
}

.full-calendar-container .fc-list-day-cushion {
    background: var(--glass-secondary);
    color: var(--text-primary);
}

.full-calendar-container .fc-list-event-time,
.full-calendar-container .fc-list-event-title {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .full-calendar-content {
        width: 100vw;
        height: 100vh;
        max-height: none;
        max-width: none;
        border-radius: 0;
    }

    .full-calendar-container .fc-toolbar {
        flex-direction: column;
        gap: 0.5em;
    }

    .full-calendar-container .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
}

/* ============================================================================
   DARKART THEME FIXES - Text contrast corrections
   ============================================================================ */

/* Stat cards: Ensure dark glass background with light text */
[data-theme="darkart"] .vendor-stat-card {
    background: rgba(20, 20, 30, 0.75);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="darkart"] .vendor-stat-value,
[data-theme="darkart"] .vendor-stat-label {
    color: rgba(250, 245, 239, 0.95);
}

/* Glass cards: Ensure dark glass background */
[data-theme="darkart"] .vendor-dashboard .glass-card {
    background: rgba(20, 20, 30, 0.75);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Quick action buttons: Dark background with light text */
[data-theme="darkart"] .quick-action-btn {
    background: rgba(20, 20, 30, 0.6);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(250, 245, 239, 0.95);
}

[data-theme="darkart"] .quick-action-btn:hover {
    background: rgba(40, 40, 55, 0.75);
}

[data-theme="darkart"] .quick-action-btn span {
    color: rgba(250, 245, 239, 0.87);
}

/* Logout button - red text on dark background */
[data-theme="darkart"] .quick-action-logout {
    color: var(--ios-system-red);
}

[data-theme="darkart"] #logoutBtn span {
    color: var(--ios-system-red);
}

/* Conversations section */
[data-theme="darkart"] .vendor-conversations-section {
    background: rgba(20, 20, 30, 0.75);
}

[data-theme="darkart"] .vendor-conversations-section .section-title,
[data-theme="darkart"] .vendor-conversations-section .text-primary {
    color: rgba(250, 245, 239, 0.95);
}

/* Section titles */
[data-theme="darkart"] .vendor-dashboard .section-title {
    color: rgba(250, 245, 239, 0.95);
}

/* ============================================================================
   PERMISSION-GATED ACTIONS - Disabled State
   ============================================================================ */

body[data-page="vendor-dashboard"] .quick-action-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
    filter: grayscale(50%);
    position: relative;
}

body[data-page="vendor-dashboard"] .quick-action-btn.disabled:hover {
    border-color: var(--glass-border);
    transform: none;
}

/* ============================================================================
   VENDOR AUSSCHREIBUNGEN SECTION (matching job postings)
   ============================================================================ */

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-section {
    margin-bottom: 1.5em;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1em;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-header h2 {
    margin: 0;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-list {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 1em;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-card:hover {
    border-color: var(--ios-system-orange);
    transform: translateY(-1px);
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75em;
    margin-bottom: 0.5em;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375em;
    margin-bottom: 0.5em;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-category-badge {
    font-size: 0.75em;
    padding: 0.125em 0.5em;
    border-radius: 1em;
    background: var(--glass-secondary);
    color: var(--text-secondary);
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin-bottom: 0.5em;
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25em;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-budget {
    display: flex;
    align-items: center;
    gap: 0.375em;
    margin-bottom: 0.5em;
    font-size: 0.875em;
    color: var(--text-secondary);
    font-weight: 500;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-description {
    font-size: 0.8125em;
    color: var(--text-tertiary);
    margin-bottom: 0.75em;
    line-height: 1.4;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-footer {
    display: flex;
    justify-content: flex-end;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-urgency {
    font-size: 0.6875em;
    padding: 0.125em 0.5em;
    border-radius: 1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-urgency-normal {
    background: var(--glass-secondary);
    color: var(--text-secondary);
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-urgency-urgent {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange, #FF9500);
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-urgency-emergency {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-show-all {
    margin-top: 0.75em;
    text-align: center;
}

body[data-page="vendor-dashboard"] .vendor-ausschreibungen-empty,
body[data-page="vendor-dashboard"] .vendor-ausschreibungen-loading,
body[data-page="vendor-dashboard"] .vendor-ausschreibungen-error {
    text-align: center;
    padding: 1.5em 1em;
}

@media (max-width: 48em) {
    body[data-page="vendor-dashboard"] .vendor-ausschreibungen-meta {
        flex-direction: column;
        gap: 0.375em;
    }
}

/**
 * @file renter-dashboard.css
 * @filepath public/css/pages/renter-dashboard.css
 * @description Styles for the renter portal dashboard
 * @created 2026-01-20
 *
 * Uses COEUS design system with glass-card components,
 * iOS-style typography, and theme-aware variables.
 */

/* ============================================
   RENTER DASHBOARD LAYOUT
   ============================================ */

.renter-page-container {
    max-width: 75em;
    margin: 0 auto;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

/* ============================================
   WELCOME HEADER
   ============================================ */

.renter-welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-lg);
    padding: var(--spacing-md) 0;
}

.renter-welcome-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.renter-header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.icon-button {
    position: relative;
    width: 2.75em;
    height: 2.75em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.icon-button .radix-icon {
    font-size: 1.25em;
}

.notification-badge,
.message-badge {
    position: absolute;
    top: -0.25em;
    right: -0.25em;
    min-width: 1.25em;
    height: 1.25em;
    padding: 0 0.25em;
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
    font-size: 0.625em;
    font-weight: 600;
    border-radius: 0.625em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   PROPERTY OVERVIEW CARD
   ============================================ */

.renter-property-card {
    padding: var(--spacing-xl);
}

.property-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
}

.property-icon-container {
    width: 3.5em;
    height: 3.5em;
    background: var(--ios-system-orange);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.property-icon-container .radix-icon {
    font-size: 1.75em;
    color: var(--button-text-on-color);
}

.property-info {
    flex: 1;
    min-width: 0;
}

.property-info h2 {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-info p {
    margin: var(--spacing-xs) 0 0;
}

.property-card-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.property-detail {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.property-detail span:first-child {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   QUICK ACTIONS GRID
   ============================================ */

.renter-actions-section h2 {
    margin: 0 0 var(--spacing-lg);
}

.renter-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18em, 1fr));
    gap: var(--spacing-md);
}

.renter-action-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.renter-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.renter-action-card:active {
    transform: translateY(0);
}

.action-icon-wrapper {
    width: 3em;
    height: 3em;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-icon-wrapper .radix-icon {
    font-size: 1.5em;
    color: var(--button-text-on-color);
}

/* Icon color variants */
.action-icon-blue {
    background: var(--ios-system-orange);
}

.action-icon-green {
    background: var(--ios-system-green);
}

.action-icon-orange {
    background: var(--ios-system-orange);
}

.action-icon-purple {
    background: var(--ios-system-purple);
}

.action-icon-teal {
    background: var(--ios-system-teal);
}

.action-icon-gray {
    background: var(--text-tertiary);
}

.action-content {
    flex: 1;
    min-width: 0;
}

.action-content h3 {
    margin: 0;
}

.action-content p {
    margin: var(--spacing-xs) 0 0;
}

.action-arrow {
    color: var(--text-tertiary);
    font-size: 1.25em;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.renter-action-card:hover .action-arrow {
    transform: translateX(4px);
    color: var(--text-secondary);
}

/* Message badge in action card */
.renter-action-card .message-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-xl);
}

/* ============================================
   ACTIVITY SECTION
   ============================================ */

.renter-activity-section,
.renter-documents-section {
    padding: var(--spacing-xl);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    margin: 0;
}

.text-link {
    color: var(--ios-system-orange);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.text-link:hover {
    opacity: 0.7;
}

.activity-list,
.documents-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.activity-empty,
.document-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    gap: var(--spacing-md);
    text-align: center;
}

.activity-item,
.document-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    background: var(--glass-primary);
    transition: background 0.2s ease;
}

.activity-item:hover,
.document-item:hover {
    background: var(--glass-hover);
}

.document-item {
    text-decoration: none;
}

.activity-icon,
.document-icon {
    width: 2.5em;
    height: 2.5em;
    border-radius: var(--radius-sm);
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon .radix-icon,
.document-icon .radix-icon {
    font-size: 1.25em;
    color: var(--text-secondary);
}

.activity-content,
.document-content {
    flex: 1;
    min-width: 0;
}

.activity-content p,
.document-content p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-arrow {
    color: var(--text-tertiary);
    font-size: 1em;
    flex-shrink: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 48em) {
    .renter-page-container {
        padding: var(--spacing-md);
        gap: var(--spacing-lg);
    }

    .renter-welcome-header {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .renter-header-actions {
        align-self: flex-end;
    }

    .property-card-details {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .property-detail {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid var(--glass-border);
    }

    .property-detail:last-child {
        border-bottom: none;
    }

    .renter-actions-grid {
        grid-template-columns: 1fr;
    }

    .renter-action-card {
        padding: var(--spacing-md);
    }

    .action-icon-wrapper {
        width: 2.5em;
        height: 2.5em;
    }

    .action-icon-wrapper .radix-icon {
        font-size: 1.25em;
    }
}

@media (max-width: 30em) {
    .property-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .property-icon-container {
        width: 3em;
        height: 3em;
    }

    .property-icon-container .radix-icon {
        font-size: 1.5em;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.renter-property-card,
.renter-action-card,
.renter-activity-section,
.renter-documents-section {
    animation: fadeInUp 0.4s ease-out backwards;
}

.renter-property-card {
    animation-delay: 0.1s;
}

.renter-action-card:nth-child(1) { animation-delay: 0.15s; }
.renter-action-card:nth-child(2) { animation-delay: 0.2s; }
.renter-action-card:nth-child(3) { animation-delay: 0.25s; }
.renter-action-card:nth-child(4) { animation-delay: 0.3s; }
.renter-action-card:nth-child(5) { animation-delay: 0.35s; }
.renter-action-card:nth-child(6) { animation-delay: 0.4s; }

.renter-activity-section {
    animation-delay: 0.45s;
}

.renter-documents-section {
    animation-delay: 0.5s;
}

/**
 * COEUS DESIGN SYSTEM - VENDOR SETTINGS PAGE
 *
 * PURPOSE:
 * Vendor settings page specific styles
 * - Glassmorphism effects for all cards and containers
 * - Theme-responsive colors via CSS variables
 * - Schedule editor with multiple time slots per day
 * - Subscription plan cards with pricing display
 * - Team subscription management section
 * - Employee contract viewer section
 *
 * DEPENDENCIES: themes-v2.css, variables-v2.css, user-profile-page.css
 * LAST UPDATED: 2026-02-09
 */

/* ===============================================
   LAYOUT & CONTAINERS
   =============================================== */

body[data-page="vendor-settings"] {
    margin: 0;
    background: transparent;
    min-height: 100vh;
}

body[data-page="vendor-settings"] .main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

/* Header Navigation */
.nav-header-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Info Grid - 2 Column Layout */
body[data-page="vendor-settings"] .info-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

@media (max-width: 48em) {
    body[data-page="vendor-settings"] .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================================
   NAVIGATION SIDEBAR
   =============================================== */

body[data-page="vendor-settings"] .nav-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

body[data-page="vendor-settings"] .nav-menu-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    margin-bottom: 0.25rem;
}

body[data-page="vendor-settings"] .nav-menu-item:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-settings"] .nav-menu-item.active {
    background: var(--glass-secondary);
    box-shadow: 0 0 20px rgba(255, 180, 100, 0.1);
}

body[data-page="vendor-settings"] .nav-menu-item .nav-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
}

body[data-page="vendor-settings"] .nav-menu-item .radix-icon {
    font-size: 1.125rem;
    opacity: 0.8;
}

/* ===============================================
   CONTENT SECTIONS
   =============================================== */

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* ===============================================
   ACCOUNT SECTION
   =============================================== */

.info-section {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.info-value-with-action {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.edit-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--ios-system-orange);
    font-size: 0.8125rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.edit-link:hover {
    opacity: 0.8;
}

/* Glass Input */
.glass-input,
.glass-select {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.625rem 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    min-width: 12em;
}

.glass-input:focus,
.glass-select:focus {
    outline: none;
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.15);
}

.glass-input.small {
    padding: 0.5rem 0.75rem;
    width: 5em;
    text-align: center;
}

.save-btn {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.5rem;
    color: var(--ios-system-orange);
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-btn:hover {
    background: var(--glass-hover);
}

/* Danger Section */
.danger-section {
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
}

.danger-title {
    color: var(--ios-system-red);
}

.danger-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 10px;
    color: var(--ios-system-red);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.danger-btn:hover {
    background: rgba(255, 59, 48, 0.25);
}

/* ===============================================
   SUBSCRIPTION SECTION
   =============================================== */

.subscription-card {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.subscription-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.plan-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.plan-badge .radix-icon {
    color: #f59e0b;
}

.subscription-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.active {
    background: var(--ios-system-green);
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.5);
}

.status-indicator.warning {
    background: var(--ios-system-orange);
    box-shadow: 0 0 8px rgba(255, 159, 10, 0.5);
}

.status-indicator.danger {
    background: var(--ios-system-red);
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.5);
}

.subscription-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 36em) {
    .subscription-details {
        grid-template-columns: 1fr;
    }
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.canceled-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 159, 10, 0.1);
    border: 1px solid rgba(255, 159, 10, 0.2);
    border-radius: 10px;
    color: var(--ios-system-orange);
    font-size: 0.875rem;
}

.subscription-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Plan Comparison */
.plan-comparison {
    margin-bottom: 1.5rem;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 48em) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
}

.plan-card {
    position: relative;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.plan-card:hover {
    border-color: var(--ios-system-orange);
    transform: translateY(-2px);
}

.plan-card.recommended {
    border-color: var(--ios-system-orange);
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.08), rgba(99, 102, 241, 0.08));
}

.plan-card.current {
    border-color: var(--ios-system-green);
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.08), rgba(48, 209, 88, 0.08));
}

.recommended-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.75rem;
    background: var(--ios-system-orange);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-header {
    text-align: center;
    margin-bottom: 1rem;
}

.plan-title {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.plan-price {
    display: block;
    color: var(--text-primary);
    font-size: 1.375rem;
    font-weight: 700;
}

.plan-price small {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
}

.plan-savings {
    display: block;
    color: var(--ios-system-green);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.plan-btn {
    width: 100%;
    padding: 0.625rem;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-btn:hover:not(:disabled) {
    background: var(--glass-hover);
    border-color: var(--ios-system-orange);
}

.plan-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cancel Section */
.cancel-section {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cancel-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.3);
    color: var(--ios-system-red);
}

.reactivate-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.3);
    border-radius: 10px;
    color: var(--ios-system-green);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reactivate-btn:hover {
    background: rgba(52, 199, 89, 0.2);
}

/* ===============================================
   AVAILABILITY SECTION
   =============================================== */

.schedule-editor {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.schedule-header .section-title {
    margin-bottom: 0;
}

.days-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.day-row {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem;
    background: var(--glass-secondary);
    border-radius: 10px;
}

@media (max-width: 48em) {
    .day-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.day-header {
    display: flex;
    align-items: center;
}

.day-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.day-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ios-system-orange);
}

.day-name {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.time-slots {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.time-slots.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.time-slot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-input {
    padding: 0.5rem 0.75rem;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
}

.time-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

.time-separator {
    color: var(--text-tertiary);
    font-weight: 500;
}

.remove-slot-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-slot-btn:hover {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

.add-slot-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--glass-primary);
    border: 1px dashed var(--glass-border);
    border-radius: 8px;
    color: var(--ios-system-orange);
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-slot-btn:hover:not(:disabled) {
    background: rgba(255, 149, 0, 0.1);
    border-color: var(--ios-system-orange);
}

.add-slot-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Additional Availability Settings */
.availability-settings {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.setting-label .radix-icon {
    color: var(--text-secondary);
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.unit {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    transition: 0.3s;
    border-radius: 14px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--ios-system-green);
    border-color: var(--ios-system-green);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* ===============================================
   NOTIFICATIONS SECTION
   =============================================== */

.notification-settings {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.notification-group {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
}

.group-title {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.notification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-row:last-child {
    border-bottom: none;
}

.notification-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.notification-label {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.notification-desc {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

/* Frequency Selector */
.frequency-selector {
    display: flex;
    gap: 1rem;
}

.frequency-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.frequency-option input[type="radio"] {
    accent-color: var(--ios-system-orange);
}

.frequency-label {
    color: var(--text-primary);
    font-size: 0.9375rem;
}

/* ===============================================
   VISIBILITY SECTION
   =============================================== */

.visibility-settings {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.visibility-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.visibility-row:last-child {
    border-bottom: none;
}

.visibility-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.visibility-label {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.visibility-desc {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

/* ===============================================
   SECURITY SECTION
   =============================================== */

.security-section {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Password form CSS REMOVED — system uses passkey + OTP only */

.session-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.session-info .radix-icon {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.session-details {
    display: flex;
    flex-direction: column;
}

.session-device {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.session-location {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.session-badge {
    padding: 0.25rem 0.625rem;
    background: var(--glass-primary);
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.session-badge.current {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

.coming-soon-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--glass-secondary);
    border-radius: 10px;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ===============================================
   SAVE SECTION
   =============================================== */

.save-section {
    display: flex;
    justify-content: flex-end;
}

.glass-button.primary {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
    color: var(--text-primary);
}

.glass-button.primary:hover {
    background: #E68600;
}

.glass-button.danger {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.3);
    color: var(--ios-system-red);
}

.glass-button.danger:hover {
    background: rgba(255, 59, 48, 0.2);
}

.glass-button.small {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
}

/* ===============================================
   MODAL
   =============================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    max-width: 32rem;
    width: 100%;
    padding: 1.5rem;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.modal-header .radix-icon.danger {
    font-size: 1.5rem;
    color: var(--ios-system-red);
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.confirm-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.confirm-input label {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ===============================================
   TOAST
   =============================================== */

#toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast .radix-icon {
    font-size: 1.125rem;
}

.toast span {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.toast-success .radix-icon {
    color: var(--ios-system-green);
}

.toast-error .radix-icon {
    color: var(--ios-system-red);
}

.toast-info .radix-icon {
    color: var(--ios-system-orange);
}

/* ===============================================
   HIDDEN UTILITY
   =============================================== */

.hidden {
    display: none !important;
}

/* ===============================================
   LOADING STATE
   =============================================== */

body[data-page="vendor-settings"] .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem;
}

body[data-page="vendor-settings"] .spinner {
    animation: spin 1s linear infinite;
    font-size: 2rem;
    color: var(--ios-system-orange);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ===============================================
   KALENDER SECTION
   =============================================== */

.calendar-intro {
    margin-bottom: var(--spacing-lg);
}

.calendar-intro-content {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.calendar-intro-content .calendar-icon {
    font-size: 2rem;
    color: var(--ios-system-orange);
    padding: var(--spacing-md);
    background: rgba(255, 149, 0, 0.1);
    border-radius: var(--radius-md);
}

.calendar-section {
    margin-bottom: var(--spacing-xl);
}

.calendar-section .section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-connections-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.calendar-connection-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
}

.calendar-connection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.calendar-connection-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.calendar-connection-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ios-system-green);
}

.calendar-connection-status.pending {
    background: var(--ios-system-orange);
}

.calendar-connection-status.error {
    background: var(--ios-system-red);
}

.calendar-connection-name {
    font-weight: 500;
    color: var(--text-primary);
}

.calendar-connection-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.calendar-connection-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.calendar-list {
    border-top: 1px solid var(--glass-border);
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
}

.calendar-list-title {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-xs);
}

.calendar-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) 0;
}

.calendar-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.calendar-item-name {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--spacing-md);
}

.provider-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.provider-card:hover:not(.disabled) {
    background: var(--glass-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.provider-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.provider-card.connected {
    border-color: var(--ios-system-green);
    background: linear-gradient(135deg, var(--glass-primary), rgba(52, 199, 89, 0.1));
}

.provider-card .coming-soon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.625rem;
    padding: 2px 6px;
    background: var(--glass-secondary);
    border-radius: 4px;
    color: var(--text-tertiary);
}

.provider-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
    font-weight: 700;
}

.provider-icon.google {
    background: rgba(234, 67, 53, 0.1);
    color: #EA4335;
}

.provider-icon.outlook {
    background: rgba(0, 120, 212, 0.1);
    color: #0078D4;
}

.provider-icon.icloud {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.provider-icon.caldav {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.provider-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.provider-status {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.provider-card.connected .provider-status {
    color: var(--ios-system-green);
}

.full-width {
    width: 100%;
    justify-content: center;
}

.empty-state {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-tertiary);
}

#no-calendars {
    display: none;
}

#no-calendars.visible {
    display: block;
}

/* Calendar Modal */
.calendar-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-modal.hidden {
    display: none;
}

.calendar-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.calendar-modal-content {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: var(--spacing-lg);
    padding: var(--spacing-xl);
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
}

.calendar-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.calendar-modal-form .form-group {
    margin-bottom: var(--spacing-md);
}

.calendar-modal-form .form-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.calendar-modal-form .form-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
}

.calendar-modal-form .form-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

.calendar-modal-form .form-help {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: var(--spacing-xs);
}

.calendar-modal-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--glass-border);
}

/* ===============================================
   DARSTELLUNG / DESIGN SETTINGS SECTION
   =============================================== */

body[data-page="vendor-settings"] .design-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 48em) {
    body[data-page="vendor-settings"] .design-grid {
        grid-template-columns: 1fr;
    }
}

body[data-page="vendor-settings"] .design-subsection {
    padding: var(--spacing-md);
    background: var(--glass-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

body[data-page="vendor-settings"] .design-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

body[data-page="vendor-settings"] .theme-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

body[data-page="vendor-settings"] .font-size-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

body[data-page="vendor-settings"] .design-hint {
    display: block;
    margin-top: var(--spacing-sm);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ===============================================
   EMPLOYEE PROFILE SECTION
   =============================================== */

body[data-page="vendor-settings"] .employee-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 36em) {
    body[data-page="vendor-settings"] .employee-form-grid {
        grid-template-columns: 1fr;
    }
}

body[data-page="vendor-settings"] .employee-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

body[data-page="vendor-settings"] #employee-edit-form .save-section {
    gap: 0.75rem;
}

/* ===============================================
   TEAM SUBSCRIPTIONS SECTION
   =============================================== */

body[data-page="vendor-settings"] .team-sub-stats {
    display: flex;
    gap: 2em;
    margin-top: 1em;
    margin-bottom: 1em;
}

body[data-page="vendor-settings"] .team-sub-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1em 1.5em;
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.75em;
    min-width: 8em;
}

body[data-page="vendor-settings"] .team-sub-stat-value {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-primary);
}

body[data-page="vendor-settings"] .team-sub-stat-label {
    font-size: 0.8125em;
    color: var(--text-secondary);
    margin-top: 0.25em;
}

body[data-page="vendor-settings"] .team-sub-actions {
    margin-top: 1em;
}

body[data-page="vendor-settings"] .team-sub-employee-row {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 0.75em 0;
    border-bottom: 0.0625em solid var(--glass-border);
}

body[data-page="vendor-settings"] .team-sub-employee-row:last-child {
    border-bottom: none;
}

body[data-page="vendor-settings"] .team-sub-employee-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

body[data-page="vendor-settings"] .team-sub-employee-name {
    font-weight: 500;
    color: var(--text-primary);
}

body[data-page="vendor-settings"] .team-sub-employee-position {
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

body[data-page="vendor-settings"] .team-sub-employee-email {
    font-size: 0.75em;
    color: var(--text-secondary);
}

body[data-page="vendor-settings"] .team-sub-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25em 0.75em;
    border-radius: 1em;
    font-size: 0.75em;
    font-weight: 500;
}

body[data-page="vendor-settings"] .team-sub-badge-active {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-settings"] .team-sub-badge-canceled {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange, #FF9500);
}

body[data-page="vendor-settings"] .team-sub-badge-none {
    background: var(--glass-primary);
    color: var(--text-tertiary);
}

@media (max-width: 36em) {
    body[data-page="vendor-settings"] .team-sub-stats {
        flex-direction: column;
        gap: 0.75em;
    }

    body[data-page="vendor-settings"] .team-sub-employee-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }
}

/* ===============================================
   CONTRACT VIEWER SECTION
   =============================================== */

body[data-page="vendor-settings"] .contract-meta {
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 0.0625em solid var(--glass-border);
}

body[data-page="vendor-settings"] .contract-document {
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.75em;
    padding: 1.5em;
    max-height: 37.5em;
    overflow-y: auto;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ===============================================
   PERMISSIONS SECTION (Freigaben)
   =============================================== */

body[data-page="vendor-settings"] .permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18em, 1fr));
    gap: 1em;
    margin-top: 1.5em;
}

body[data-page="vendor-settings"] .permission-item {
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.75em;
    padding: 1em;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

body[data-page="vendor-settings"] .permission-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    color: var(--text-primary);
    font-weight: 600;
}

body[data-page="vendor-settings"] .permission-header i {
    color: var(--ios-system-green);
    font-size: 1.2em;
}

body[data-page="vendor-settings"] .permission-actions {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.4;
}

body[data-page="vendor-settings"] .permission-full-access,
body[data-page="vendor-settings"] .permission-no-access {
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.75em;
    padding: 1.5em;
    display: flex;
    align-items: center;
    gap: 1em;
    color: var(--text-primary);
}

body[data-page="vendor-settings"] .permission-full-access i {
    color: var(--ios-system-green);
}

body[data-page="vendor-settings"] .permission-no-access i {
    color: var(--text-tertiary);
}

body[data-page="vendor-settings"] #permissionsLoading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75em;
    color: var(--text-secondary);
    padding: 2em;
}

body[data-page="vendor-settings"] #permissionsLoading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===============================================
   TEAM PERMISSIONS SECTION
   =============================================== */

body[data-page="vendor-settings"] .team-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20em, 1fr));
    gap: 1.5em;
    margin-top: 1.5em;
}

body[data-page="vendor-settings"] .team-member-card {
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.75em;
    padding: 1.25em;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="vendor-settings"] .member-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1em;
}

body[data-page="vendor-settings"] .member-info {
    flex: 1;
}

body[data-page="vendor-settings"] .member-name {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0 0 0.25em 0;
}

body[data-page="vendor-settings"] .member-email {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin: 0;
}

body[data-page="vendor-settings"] .edit-btn {
    background: var(--glass-hover);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.5em 0.75em;
    color: var(--text-primary);
    font-size: 0.85em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5em;
    white-space: nowrap;
}

body[data-page="vendor-settings"] .edit-btn:hover {
    background: var(--glass-secondary);
}

body[data-page="vendor-settings"] .member-permissions {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

body[data-page="vendor-settings"] .perm-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.4em 0.75em;
    border-radius: 0.4em;
    font-size: 0.85em;
}

body[data-page="vendor-settings"] .perm-badge.full-access {
    background: rgba(52, 199, 89, 0.1);
    color: var(--ios-system-green);
}

body[data-page="vendor-settings"] .perm-badge.partial-access {
    background: rgba(255, 149, 0, 0.1);
    color: var(--ios-system-orange);
}

body[data-page="vendor-settings"] .perm-badge.no-access {
    background: var(--glass-primary);
    color: var(--text-tertiary);
}

body[data-page="vendor-settings"] .team-members-empty {
    text-align: center;
    padding: 3em 1.5em;
    background: var(--glass-primary);
    border: 0.0625em dashed var(--glass-border);
    border-radius: 0.75em;
    color: var(--text-secondary);
}

/* Permission Form */
body[data-page="vendor-settings"] .permission-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16em, 1fr));
    gap: 1.5em;
    margin-bottom: 1.5em;
}

body[data-page="vendor-settings"] .perm-category {
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.5em;
    padding: 1em;
}

body[data-page="vendor-settings"] .perm-category-title {
    color: var(--text-primary);
    font-size: 0.95em;
    font-weight: 600;
    margin: 0 0 0.75em 0;
}

body[data-page="vendor-settings"] .perm-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

body[data-page="vendor-settings"] .perm-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5em;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9em;
}

body[data-page="vendor-settings"] .perm-checkbox input {
    cursor: pointer;
    width: 1em;
    height: 1em;
}

body[data-page="vendor-settings"] .perm-checkbox:hover {
    color: var(--text-primary);
}

body[data-page="vendor-settings"] .modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

body[data-page="vendor-settings"] .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body[data-page="vendor-settings"] .modal-actions {
    display: flex;
    gap: 0.75em;
}

/* ===============================================
   ROLE-BASED ACCESS CONTROL STYLES
   =============================================== */

body[data-page="vendor-settings"] .disabled-input {
    background: var(--glass-secondary) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
}

body[data-page="vendor-settings"] input:disabled,
body[data-page="vendor-settings"] select:disabled {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================ */
/*  Employee Contactable Toggle                 */
/* ============================================ */

body[data-page="vendor-settings"] .member-contactable-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625em 0;
    border-top: 0.0625em solid var(--glass-border);
}

body[data-page="vendor-settings"] .member-contactable-label {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-secondary);
}

body[data-page="vendor-settings"] .member-contactable-toggle {
    position: relative;
    width: 2.75em;
    height: 1.5em;
    border-radius: 0.75em;
    border: none;
    background: var(--glass-secondary, rgba(120, 120, 128, 0.2));
    cursor: pointer;
    transition: background 0.25s ease;
    padding: 0;
    flex-shrink: 0;
}

body[data-page="vendor-settings"] .member-contactable-toggle.active {
    background: var(--ios-system-green, #34C759);
}

body[data-page="vendor-settings"] .member-contactable-knob {
    position: absolute;
    top: 0.125em;
    left: 0.125em;
    width: 1.25em;
    height: 1.25em;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0.0625em 0.1875em rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease;
}

body[data-page="vendor-settings"] .member-contactable-toggle.active .member-contactable-knob {
    transform: translateX(1.25em);
}

/**
 * @file marketplace.css
 * @filepath public/css/pages/marketplace.css
 * @description Styles for vendor marketplace discovery page
 * @created 2025-12-16
 *
 * <file_documentation>
 *   <purpose>
 *     Styling for marketplace vendor discovery including search filters,
 *     vendor cards grid, availability picker, and contact modal.
 *   </purpose>
 *   <theme_support>All 5 themes via CSS variables</theme_support>
 * </file_documentation>
 */

/* ============================================================================
   MARKETPLACE LAYOUT
   ============================================================================ */

.marketplace-page {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
}

.marketplace-header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.marketplace-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

/* Messages Icon Button */
.messages-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3em;
    height: 3em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.messages-icon-btn:hover {
    background: var(--glass-hover);
    border-color: var(--ios-system-orange);
    color: var(--ios-system-orange);
    transform: scale(1.05);
}

.messages-icon-btn svg {
    width: 1.25em;
    height: 1.25em;
}

.messages-badge {
    position: absolute;
    top: -0.25em;
    right: -0.25em;
    min-width: 1.25em;
    height: 1.25em;
    padding: 0 0.35em;
    background: var(--ios-system-red);
    color: var(--text-primary);
    font-size: 0.625em;
    font-weight: 600;
    border-radius: 0.625em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.messages-badge.hidden {
    display: none;
}

/* ============================================================================
   SEARCH & FILTERS
   ============================================================================ */

.marketplace-search-bar {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    min-width: 15em;
    position: relative;
}

.search-input-wrapper svg {
    position: absolute;
    left: 0.875em;  /* Centered within input's 2.75em left padding, accounting for ~1em icon */
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
    width: 1em;
    height: 1em;
}

.search-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1em;
}

.search-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.filter-btn:hover {
    background: var(--glass-hover);
}

.filter-btn.active {
    background: var(--ios-system-orange);
    color: var(--text-primary);
    border-color: var(--ios-system-orange);
}

.filter-btn svg {
    width: 1.25em;
    height: 1.25em;
}

/* Filter Panel */
.filter-panel {
    display: none;
    padding: var(--spacing-lg);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.filter-panel.open {
    display: block;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15em, 1fr));
    gap: var(--spacing-lg);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.filter-group label {
    font-size: 0.875em;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-select,
.filter-input {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875em;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--glass-border);
}

/* Category Pills */
.category-pills {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.category-pill {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.875em;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-pill:hover {
    background: var(--glass-hover);
}

.category-pill.active {
    background: var(--ios-system-orange);
    color: var(--text-primary);
    border-color: var(--ios-system-orange);
}

/* ============================================================================
   VENDOR CARDS GRID
   ============================================================================ */

.vendors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22em, 1fr));
    gap: var(--spacing-lg);
}

.vendor-card {
    display: flex;
    flex-direction: column;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.vendor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.vendor-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
}

.vendor-card-logo {
    width: 5em;
    height: 5em;
    border-radius: var(--radius-lg);
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.vendor-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vendor-card-logo-placeholder {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-secondary);
}

.vendor-card-info {
    flex: 1;
    min-width: 0;
}

.vendor-card-name {
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: var(--spacing-xxs);
}

.vendor-card-location {
    display: flex;
    align-items: center;
    gap: var(--spacing-xxs);
    font-size: 0.75em;
    color: var(--text-secondary);
}

.vendor-card-location svg {
    width: 0.875em;
    height: 0.875em;
}

.vendor-card-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-xxs);
    font-size: 0.75em;
    color: var(--text-secondary);
    margin-top: var(--spacing-xxs);
}

.vendor-card-rating svg {
    width: 0.875em;
    height: 0.875em;
    color: var(--ios-system-yellow);
    fill: var(--ios-system-yellow);
}

.vendor-card-body {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    flex: 1;
}

.vendor-card-description {
    font-size: 0.9375em;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.vendor-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xxs);
}

.vendor-category-tag {
    font-size: 0.625em;
    padding: 0.25em 0.5em;
    background: var(--glass-secondary);
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
}

.vendor-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
    background: var(--glass-secondary);
}

.vendor-card-price {
    font-size: 0.875em;
}

.vendor-card-price-value {
    font-weight: 600;
    color: var(--text-primary);
}

.vendor-card-price-unit {
    font-size: 0.75em;
    color: var(--text-tertiary);
}

.vendor-card-availability {
    display: flex;
    align-items: center;
    gap: var(--spacing-xxs);
    font-size: 0.75em;
}

.vendor-card-availability.available {
    color: var(--ios-system-green);
}

.vendor-card-availability.unavailable {
    color: var(--text-tertiary);
}

/* ============================================================================
   VENDOR BADGES
   ============================================================================ */

.vendor-badges {
    display: flex;
    gap: var(--spacing-xxs);
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
}

.vendor-badge-mini {
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vendor-badge-mini.verified {
    background: var(--ios-system-orange);
    color: var(--text-primary);
}

.vendor-badge-mini.featured {
    background: var(--ios-system-yellow);
    color: var(--text-primary);
}

.vendor-badge-mini svg {
    width: 0.875em;
    height: 0.875em;
}

/* ============================================================================
   FEATURED VENDORS SECTION
   ============================================================================ */

.featured-vendors-section {
    margin-bottom: var(--spacing-lg);
}

.featured-vendors-scroll {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
    scrollbar-width: thin;
}

.featured-vendor-card {
    flex: 0 0 20em;
    background: linear-gradient(135deg, var(--glass-primary), var(--glass-secondary));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.featured-vendor-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6em;
    height: 6em;
    background: linear-gradient(135deg, var(--ios-system-yellow), transparent);
    opacity: 0.2;
    border-radius: 0 var(--radius-lg) 0 100%;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xxs);
    padding: var(--spacing-xxs) var(--spacing-sm);
    background: var(--ios-system-yellow);
    color: var(--text-primary);
    font-size: 0.625em;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-sm);
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

.vendors-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xxl);
    text-align: center;
}

.vendors-empty svg {
    width: 4em;
    height: 4em;
    color: var(--text-quaternary);
    margin-bottom: var(--spacing-md);
}

.vendors-empty h3 {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.vendors-empty p {
    color: var(--text-tertiary);
    font-size: 0.875em;
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */

.vendors-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xxl);
}

.loading-spinner {
    width: 2.5em;
    height: 2.5em;
    border: 3px solid var(--glass-border);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   PAGINATION
   ============================================================================ */

.vendors-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5em;
    height: 2.5em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--glass-hover);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: var(--ios-system-orange);
    color: var(--text-primary);
    border-color: var(--ios-system-orange);
}

.pagination-info {
    font-size: 0.875em;
    color: var(--text-secondary);
    padding: 0 var(--spacing-md);
}

/* ============================================================================
   CONTACT VENDOR MODAL
   ============================================================================ */

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.contact-modal.open {
    display: flex;
}

.contact-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.contact-modal-content {
    position: relative;
    width: 100%;
    max-width: 32em;
    background: var(--glass-thick);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.contact-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
}

.contact-modal-body {
    padding: var(--spacing-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.contact-form-group label {
    font-size: 0.875em;
    font-weight: 500;
    color: var(--text-secondary);
}

.contact-form-group input,
.contact-form-group textarea,
.contact-form-group select {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1em;
}

.contact-form-group textarea {
    min-height: 8em;
    resize: vertical;
}

.contact-form-group input:focus,
.contact-form-group textarea:focus,
.contact-form-group select:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

.contact-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 40em) {
    .marketplace-search-bar {
        flex-direction: column;
    }

    .search-input-wrapper {
        min-width: 100%;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .vendors-grid {
        grid-template-columns: 1fr;
    }

    .featured-vendor-card {
        flex: 0 0 85%;
    }
}

/**
 * @file messages.css
 * @filepath public/css/pages/messages.css
 * @description Styling for the owner messages page (Fiverr-style messaging)
 * @created 2025-12-17
 *
 * Layout: Two-column (conversations list + chat panel)
 * Mobile: Single column with toggle
 *
 * Theme-aware using CSS variables from themes-v2.css
 */

/* ============================================================================
   MAIN LAYOUT
   ============================================================================ */

.messages-page {
    display: flex;
    position: relative;
    height: calc(100vh - 4em);
    min-height: 500px;
    background: var(--glass-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: var(--spacing-md);
}

/* ============================================================================
   CONVERSATIONS PANEL (Left Side)
   ============================================================================ */

.conversations-panel {
    width: 20em;
    min-width: 18em;
    max-width: 24em;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    background: var(--glass-secondary);
}

.conversations-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
}

.conversations-header h2 {
    margin: 0;
}

.unread-badge {
    background: var(--ios-system-red);
    color: var(--text-primary);
    font-size: 0.75em;
    font-weight: 600;
    padding: 0.2em 0.5em;
    border-radius: 1em;
    min-width: 1.5em;
    text-align: center;
}

.conversations-search {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--glass-border);
}

.search-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375em;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-sm);
}

/* Conversation Item */
.conversation-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: var(--spacing-xs);
}

.conversation-item:hover {
    background: var(--glass-hover);
}

.conversation-item.active {
    background: var(--glass-active);
}

.conversation-item.unread {
    background: rgba(255, 149, 0, 0.08);
}

.conversation-avatar {
    width: 3em;
    height: 3em;
    border-radius: 50%;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875em;
    flex-shrink: 0;
    overflow: hidden;
}

.conversation-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xs);
    margin-bottom: 0.25em;
}

.conversation-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9375em;
}

.conversation-time {
    font-size: 0.75em;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.conversation-preview {
    font-size: 0.8125em;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-indicator {
    background: var(--ios-system-orange);
    color: var(--text-primary);
    font-size: 0.6875em;
    font-weight: 600;
    padding: 0.2em 0.5em;
    border-radius: 1em;
    min-width: 1.2em;
    text-align: center;
}

/* Empty State */
.conversations-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    text-align: center;
}

.conversations-empty .empty-icon {
    width: 4em;
    height: 4em;
    color: var(--text-quaternary);
    margin-bottom: var(--spacing-md);
}

.btn-find-vendors {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--ios-system-orange);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875em;
    transition: opacity 0.2s;
}

.btn-find-vendors:hover {
    opacity: 0.9;
}

/* ============================================================================
   CHAT PANEL (Right Side)
   ============================================================================ */

.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--glass-primary);
    min-width: 0;
}

/* Sidebar toggle - hidden by default, shown on tablet via media query */
.sidebar-toggle {
    display: none;
}

.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-2xl);
}

.chat-empty .empty-icon {
    width: 5em;
    height: 5em;
    color: var(--text-quaternary);
    margin-bottom: var(--spacing-lg);
}

.chat-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-secondary);
}

.btn-back-mobile {
    display: none;
    width: 2.5em;
    height: 2.5em;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
}

.btn-back-mobile svg {
    width: 1.5em;
    height: 1.5em;
}

.chat-header-avatar {
    width: 2.75em;
    height: 2.75em;
    border-radius: 50%;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875em;
    overflow: hidden;
}

.chat-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-header-info {
    flex: 1;
    min-width: 0;
}

.chat-header-info h3 {
    margin: 0 0 0.125em 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-view-profile {
    width: 2.5em;
    height: 2.5em;
    border: none;
    background: var(--glass-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.btn-view-profile:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.btn-view-profile svg {
    width: 1.25em;
    height: 1.25em;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.message-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.message-wrapper.sent {
    align-self: flex-end;
    align-items: flex-end;
}

.message-wrapper.received {
    align-self: flex-start;
    align-items: flex-start;
}

.message-bubble {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    max-width: 100%;
}

.message-wrapper.sent .message-bubble {
    background: var(--ios-system-orange);
    color: var(--text-primary);
    border-bottom-right-radius: var(--radius-xs);
}

.message-wrapper.received .message-bubble {
    background: var(--glass-secondary);
    color: var(--text-primary);
    border-bottom-left-radius: var(--radius-xs);
}

.message-content {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 1.0625em;
    line-height: 1.5;
}

/* Time below bubble (outside) */
.message-time-below {
    font-size: 0.75em;
    color: var(--text-tertiary);
    margin-top: 0.35em;
    padding: 0 0.25em;
}

.message-wrapper.sent .message-time-below {
    text-align: right;
}

.message-wrapper.received .message-time-below {
    text-align: left;
}

/* Legacy time inside bubble (keep for backwards compat) */
.message-time {
    font-size: 0.6875em;
    opacity: 0.7;
    margin-top: 0.25em;
    text-align: right;
}

/* System Messages */
.system-message {
    align-self: center;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    font-size: 0.8125em;
    color: var(--text-secondary);
}

.system-icon {
    width: 1.25em;
    height: 1.25em;
}

.system-icon.success {
    color: var(--ios-system-green);
}

.system-icon.error {
    color: var(--ios-system-red);
}

/* ============================================================================
   PROMINENT ACCEPTED QUOTE CARD
   ============================================================================ */

.quote-accepted-card {
    align-self: center;
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.2) 0%, rgba(52, 199, 89, 0.1) 100%);
    border: 2px solid var(--ios-system-green);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg) var(--spacing-xl);
    max-width: 28em;
    text-align: center;
    box-shadow: 0 4px 20px rgba(52, 199, 89, 0.25);
}

.quote-accepted-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.quote-accepted-icon {
    width: 2em;
    height: 2em;
    color: var(--ios-system-green);
}

.quote-accepted-label {
    font-size: 1em;
    font-weight: 700;
    color: var(--ios-system-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quote-accepted-content {
    font-size: 1.0625em;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Quote Cards in Chat */
.quote-card-inline,
.quote-request-card {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--ios-system-orange);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    max-width: 24em;
}

.quote-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.quote-icon {
    width: 1.25em;
    height: 1.25em;
    color: var(--ios-system-orange);
}

.quote-card-label {
    font-size: 0.8125em;
    font-weight: 600;
    color: var(--ios-system-orange);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.quote-card-content {
    font-size: 1em;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
    line-height: 1.5;
}

.btn-view-quote {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--ios-system-orange);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8125em;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-view-quote:hover {
    opacity: 0.9;
}

.quote-card-actions {
    display: flex;
    gap: 0.5em;
    align-items: center;
    flex-wrap: wrap;
}

.btn-download-quote {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--glass-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.8125em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download-quote:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.btn-create-quote {
    display: inline-block;
    margin-top: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--ios-system-green);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8125em;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-create-quote:hover {
    opacity: 0.9;
}

/* Chat Input Area */
.chat-input-area {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
    background: var(--glass-secondary);
    width: 100%;
    box-sizing: border-box;
}

.btn-request-quote {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8125em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    height: 3em;
}

.btn-request-quote:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.btn-request-quote svg {
    width: 1.125em;
    height: 1.125em;
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-sm);
    width: 47vw;
    min-width: 0;
}

.message-input {
    flex: 1;
    width: 100%;
    padding: var(--spacing-md);
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1em;
    resize: none;
    min-height: 4em;
    max-height: 12em;
    line-height: 1.5;
    box-sizing: border-box;
}

.message-input::placeholder {
    color: var(--text-tertiary);
}

.btn-send {
    width: 2.5em;
    height: 2.5em;
    border: none;
    background: var(--ios-system-orange);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.btn-send:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-send svg {
    width: 1.25em;
    height: 1.25em;
}

/* Chat Input Controls (wraps buttons and input) */
.chat-input-controls {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: var(--spacing-sm);
    width: 100%;
}

/* Chat Attachment Button */
.chat-attachment-btn {
    width: 2.5em;
    height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.chat-attachment-btn:hover {
    color: var(--text-primary);
    border-color: var(--glass-border-hover);
}

.chat-attachment-btn svg {
    width: 1.25em;
    height: 1.25em;
}

/* Chat Attachment Preview */
.chat-attachment-preview {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    max-height: 10em;
    overflow-y: auto;
    width: 100%;
}

.chat-attachment-preview.hidden {
    display: none;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--glass-secondary);
    border-radius: var(--radius-sm);
}

.attachment-item-icon {
    width: 1.5em;
    height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.attachment-item-info {
    flex: 1;
    min-width: 0;
}

.attachment-item-name {
    font-size: 0.875em;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-item-size {
    font-size: 0.75em;
    color: var(--text-tertiary);
}

.attachment-item-remove {
    width: 1.5em;
    height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.attachment-item-remove:hover {
    color: var(--ios-system-red);
}

/* Message Attachment Display */
.message-attachments {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
}

.message-attachment {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--glass-primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.875em;
    transition: background 0.2s ease;
}

.message-attachment:hover {
    background: var(--glass-hover);
}

.message-attachment-icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

.message-attachment-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================================
   MODALS
   ============================================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-lg);
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    width: 100%;
    max-width: 28em;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.modal-content.modal-large {
    max-width: 36em;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    margin: 0;
}

.btn-close-modal {
    width: 2em;
    height: 2em;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.btn-close-modal:hover {
    background: var(--glass-hover);
}

.btn-close-modal svg {
    width: 1.25em;
    height: 1.25em;
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
}

#requestQuoteModal .form-group {
    margin-bottom: var(--spacing-lg);
}

#requestQuoteModal .form-group:last-child {
    margin-bottom: 0;
}

#requestQuoteModal .form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
}

.quote-description-input,
.reject-reason-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375em;
    resize: vertical;
    min-height: 6em;
}

.context-select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375em;
}

.btn-cancel,
.btn-submit,
.btn-accept,
.btn-reject {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375em;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-cancel {
    background: var(--glass-secondary);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    background: var(--glass-hover);
}

.btn-submit,
.btn-accept {
    background: var(--ios-system-green);
    color: var(--text-primary);
}

.btn-submit:hover,
.btn-accept:hover {
    opacity: 0.9;
}

.btn-reject {
    background: var(--ios-system-red);
    color: var(--text-primary);
}

.btn-reject:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: var(--glass-secondary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass-hover);
}

/* ============================================================================
   QUOTE DETAIL MODAL
   ============================================================================ */

.quote-detail {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.quote-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.quote-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    font-size: 0.875em;
}

.quote-number {
    font-weight: 600;
    color: var(--text-primary);
}

.quote-valid {
    color: var(--text-tertiary);
}

.quote-items h4 {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-primary);
    font-size: 1em;
}

.quote-item {
    padding: var(--spacing-md);
    background: var(--glass-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.quote-item.optional {
    opacity: 0.7;
    border: 1px dashed var(--glass-border);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.item-title {
    font-weight: 500;
    color: var(--text-primary);
}

.item-price {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.item-description {
    font-size: 0.8125em;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-xs) 0;
    line-height: 1.4;
}

.item-details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    font-size: 0.75em;
    color: var(--text-tertiary);
}

.item-optional-badge {
    background: var(--ios-system-orange);
    color: var(--text-primary);
    padding: 0.1em 0.4em;
    border-radius: var(--radius-xs);
    font-weight: 500;
}

.quote-totals {
    border-top: 1px solid var(--glass-border);
    padding-top: var(--spacing-md);
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-xs) 0;
    font-size: 0.9375em;
}

.total-row.mwst {
    color: var(--text-tertiary);
    font-size: 0.875em;
}

.total-row.total {
    font-weight: 600;
    font-size: 1.125em;
    color: var(--ios-system-green);
    border-top: 1px solid var(--glass-border);
    padding-top: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}

.quote-variable-costs {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.3);
    border-radius: var(--radius-md);
}

.quote-variable-costs svg {
    width: 1.5em;
    height: 1.5em;
    color: var(--ios-system-orange);
    flex-shrink: 0;
}

.quote-variable-costs strong {
    color: var(--text-primary);
}

.quote-variable-costs p {
    margin: 0.25em 0 0;
    font-size: 0.875em;
}

.quote-timeline {
    padding: var(--spacing-md);
    background: var(--glass-primary);
    border-radius: var(--radius-md);
}

.quote-timeline p {
    margin: 0 0 0.25em 0;
    font-size: 0.875em;
    color: var(--text-secondary);
}

.quote-timeline p:last-child {
    margin-bottom: 0;
}

.quote-status {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 500;
    text-align: center;
}

.quote-status-accepted {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

.quote-status-rejected {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

.quote-status-expired,
.quote-status-withdrawn {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
}

.quote-status-completed {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

/* Tablet (iPad mini / iPad) - Collapsible sidebar */
@media (min-width: 48em) and (max-width: 64em) {
    .conversations-panel {
        width: 13em;
        min-width: 13em;
        max-width: 13em;
        flex-shrink: 0;
        transition: margin-left 0.3s ease;
        margin-left: 0;
    }

    .conversations-panel.collapsed {
        margin-left: -13em;
    }

    /* Toggle button - positioned at the edge of sidebar */
    .sidebar-toggle {
        display: flex;
        position: absolute;
        left: 13em;
        top: 50%;
        transform: translateY(-50%);
        z-index: 50;
        width: 1.5em;
        height: 3em;
        background: var(--glass-secondary);
        border: 1px solid var(--glass-border);
        border-left: none;
        border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--text-secondary);
        transition: left 0.3s ease, color 0.2s;
    }

    .sidebar-toggle:hover {
        color: var(--text-primary);
    }

    .sidebar-toggle svg {
        width: 1em;
        height: 1em;
        transition: transform 0.3s ease;
    }

    /* When sidebar is collapsed */
    .conversations-panel.collapsed ~ .sidebar-toggle {
        left: 0;
    }

    .conversations-panel.collapsed ~ .sidebar-toggle svg {
        transform: rotate(180deg);
    }

    /* Adjust input width for tablet */
    .chat-input-wrapper {
        width: 50vw !important;
    }
}

/* Mobile - below iPad mini portrait */
@media (max-width: 47.9375em) {
    .messages-page {
        margin: 0;
        border-radius: 0;
        height: 100vh;
    }

    .conversations-panel {
        width: 100%;
        max-width: none;
        position: absolute;
        inset: 0;
        z-index: 10;
    }

    .conversations-panel.hidden-mobile {
        display: none;
    }

    .chat-panel {
        position: absolute;
        inset: 0;
    }

    .btn-back-mobile {
        display: flex;
    }

    .chat-header-avatar {
        display: none;
    }

    .message-wrapper {
        max-width: 90%;
    }

    /* Compact input area on mobile */
    .chat-input-area {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .btn-request-quote span {
        display: none;
    }

    .btn-request-quote {
        padding: var(--spacing-sm);
        width: 3em;
        justify-content: center;
    }
}

/* ============================================================================
   QUOTE BUILDER MODAL (Vendors)
   ============================================================================ */

#quoteBuilderModal.modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

#quoteBuilderModal.hidden {
    display: none !important;
}

#quoteBuilderModal .quote-builder-modal {
    width: 95%;
    max-width: 56em;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 0;
    transition: transform 0.3s ease;
}

#quoteBuilderModal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    background: var(--glass-secondary);
    z-index: 1;
}

#quoteBuilderModal .modal-header h2 {
    margin: 0;
    font-size: 1.1em;
}

#quoteBuilderModal .btn-close-modal {
    width: 2em;
    height: 2em;
    border: none;
    background: var(--glass-hover);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

#quoteBuilderModal .btn-close-modal:hover {
    background: var(--glass-active);
    color: var(--text-primary);
}

#quoteBuilderModal .btn-close-modal svg {
    width: 1em;
    height: 1em;
}

#quoteBuilderModal .quote-builder-form {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

#quoteBuilderModal .quote-section {
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--glass-border);
}

#quoteBuilderModal .quote-section:last-of-type {
    border-bottom: none;
}

#quoteBuilderModal .quote-section h3 {
    margin-bottom: var(--spacing-sm);
}

#quoteBuilderModal .form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    margin-bottom: var(--spacing-sm);
}

#quoteBuilderModal .form-label {
    display: block;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 0.25em;
}

#quoteBuilderModal .form-input {
    width: 100% !important;
    max-width: none !important;
    padding: var(--spacing-sm);
    box-sizing: border-box;
    background: var(--input-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95em;
    text-align: center;
    display: block;
    min-width: 0;
}

/* Key fields should be full width with minimal side margin */
#quoteBuilderModal #quoteTitle,
#quoteBuilderModal #quoteDescription,
#quoteBuilderModal .item-title,
#quoteBuilderModal .item-description {
    width: 100% !important;
    max-width: none !important;
}

#quoteBuilderModal .quote-section:first-child .form-group,
#quoteBuilderModal .quote-item-editor .item-title-group,
#quoteBuilderModal .quote-item-editor .item-description-group {
    padding-left: var(--spacing-xs);
    padding-right: var(--spacing-xs);
}

#quoteBuilderModal .form-input:focus {
    outline: none;
    border-color: var(--ios-system-orange) !important;
}

#quoteBuilderModal .form-input-sm {
    width: 6em;
}

#quoteBuilderModal .form-row {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-sm);
    align-items: flex-end;
    min-width: 0;
}

#quoteBuilderModal .form-checkbox {
    width: 1.2em;
    height: 1.2em;
    accent-color: var(--ios-system-orange);
}

/* Quote Items */
#quoteBuilderModal .quote-items-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

#quoteBuilderModal .quote-item-editor {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    width: 100%;
    box-sizing: border-box;
}

#quoteBuilderModal .quote-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xs);
}

#quoteBuilderModal .quote-item-header + .form-group {
    margin-top: var(--spacing-xs);
}

#quoteBuilderModal .quote-item-number {
    font-size: 0.8em;
    color: var(--text-tertiary);
    font-weight: 600;
}

#quoteBuilderModal .quote-item-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: pointer;
    line-height: 1;
}

#quoteBuilderModal .quote-item-remove:hover {
    color: var(--ios-system-red);
}

#quoteBuilderModal .item-total {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
}

#quoteBuilderModal .item-total-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Quote Totals */
#quoteBuilderModal .quote-totals-preview {
    background: var(--glass-primary);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
}

#quoteBuilderModal .quote-total-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-xs) 0;
    font-size: 0.9em;
    color: var(--text-secondary);
}

#quoteBuilderModal .quote-total-row.mwst {
    border-bottom: 1px solid var(--glass-border);
}

#quoteBuilderModal .quote-total-row.total {
    font-weight: 600;
    color: var(--ios-system-green);
    font-size: 1em;
}

/* Actions */
#quoteBuilderModal .quote-actions-row {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    padding-top: var(--spacing-md);
}

#quoteBuilderModal .quote-actions-row .btn-primary {
    background: var(--ios-system-orange);
    color: var(--text-primary);
}

#quoteBuilderModal .quote-actions-row .btn-primary:hover {
    background: #E68600;
}

/* Toast Notification */
.messages-toast {
    position: fixed;
    bottom: 2em;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    color: var(--text-primary);
    font-size: 0.95em;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    animation: slideUp 0.3s ease;
}

.messages-toast.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(1em);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ============================================
   QUOTE DETAIL MODAL - ENHANCED STYLING
   ============================================ */

/* Wider quote modal */
.modal-quote-detail {
    max-width: 800px;
    width: 95vw;
}

/* Vendor header/letterhead section */
.quote-vendor-header {
    display: flex;
    gap: var(--space-lg, 1.5rem);
    padding-bottom: var(--space-lg, 1.5rem);
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    margin-bottom: var(--space-lg, 1.5rem);
}

.quote-vendor-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius-md, 12px);
    background: var(--glass-primary, rgba(255, 255, 255, 0.05));
}

.quote-vendor-info {
    flex: 1;
}

.quote-vendor-name {
    display: block;
    font-size: var(--font-size-lg, 1.125rem);
    color: var(--text-primary);
    margin-bottom: var(--space-xs, 0.25rem);
}

.quote-vendor-address,
.quote-vendor-contact {
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--text-secondary);
    margin: var(--space-xxs, 0.125rem) 0;
}

.quote-vendor-tax {
    font-size: var(--font-size-xs, 0.75rem);
    color: var(--text-tertiary);
    margin-top: var(--space-xs, 0.25rem);
}

/* Subject line */
.quote-subject {
    font-size: var(--font-size-md, 1rem);
    color: var(--text-primary);
    margin-bottom: var(--space-md, 1rem);
    padding: var(--space-sm, 0.5rem);
    background: var(--glass-secondary, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-sm, 8px);
}

/* Legal disclaimers section */
.quote-legal-disclaimers {
    margin-top: var(--space-xl, 2rem);
    padding: var(--space-md, 1rem);
    background: var(--glass-secondary, rgba(255, 255, 255, 0.05));
    border-radius: var(--radius-md, 12px);
    border-left: 3px solid var(--ios-system-orange, #FF9500);
}

.quote-legal-disclaimers h4 {
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs, 0.25rem);
    font-weight: 600;
}

.quote-legal-disclaimers h4:not(:first-child) {
    margin-top: var(--space-md, 1rem);
}

.quote-legal-disclaimers p {
    font-size: var(--font-size-xs, 0.75rem);
    color: var(--text-tertiary);
    line-height: 1.5;
}

/* Signature section */
.quote-signature {
    margin-top: var(--space-xl, 2rem);
    text-align: right;
    padding-top: var(--space-lg, 1.5rem);
    border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.quote-signature-label {
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm, 0.5rem);
}

.quote-signature-image {
    max-width: 200px;
    max-height: 80px;
    display: block;
    margin-left: auto;
}

.quote-signature-name {
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--text-primary);
    font-weight: 600;
    margin-top: var(--space-xs, 0.25rem);
}

/* PDF download button */
.btn-download-pdf {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs, 0.25rem);
    margin-right: auto;
}

.btn-download-pdf svg {
    width: 16px;
    height: 16px;
}

/* Ensure footer has proper layout for download + action buttons */
.modal-footer {
    display: flex;
    gap: var(--space-sm, 0.5rem);
    justify-content: flex-end;
    align-items: center;
}

.modal-footer .btn-download-pdf {
    margin-right: auto;
}

/* ============================================================================
   VENDOR VIEW (No Sidebar)
   ============================================================================ */

body.vendor-view {
    padding: 0;
}

body.vendor-view .messages-page {
    margin: 0;
    border-radius: 0;
    height: calc(100vh - 60px);
}

.vendor-messages-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--glass-primary);
    border-bottom: 1px solid var(--glass-border);
    height: 60px;
}

.vendor-back-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
    font-size: 0.9375em;
    font-weight: 500;
}

.vendor-back-btn:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
    border-color: var(--ios-system-orange);
}

.vendor-back-btn svg {
    width: 18px;
    height: 18px;
}

.vendor-header-divider {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
}

.vendor-messages-title {
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Calendar button in header */
.vendor-calendar-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9375em;
    font-weight: 500;
    margin-left: auto;
}

.vendor-calendar-btn:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
    border-color: var(--ios-system-orange);
}

.vendor-calendar-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================================================
   CALENDAR POPUP MODAL (Coexists with Quote Builder)
   ============================================================================ */

.calendar-popup-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40vw;
    max-width: 100vw;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.calendar-popup-modal.hidden {
    display: none;
}

.calendar-popup-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: var(--spacing-md);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-height: calc(100vh - 2 * var(--spacing-md));
}

.calendar-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.calendar-popup-header h3 {
    margin: 0;
}

.calendar-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

#messagesCalendarContainer {
    min-height: 400px;
}

/* FullCalendar overrides for popup */
.calendar-popup-body .fc {
    font-size: 0.85em;
}

.calendar-popup-body .fc-toolbar-title {
    font-size: 1.1em !important;
}

.calendar-popup-body .fc-button {
    padding: 0.3em 0.6em !important;
    font-size: 0.85em !important;
}

/* When both modals open, shift quote builder left */
body.calendar-popup-open #quoteBuilderModal .quote-builder-modal {
    transform: translateX(-220px);
}

/* All form groups inside rows should not force full width */
#quoteBuilderModal .form-row .form-group {
    width: auto;
}

#quoteBuilderModal select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.5)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    text-align-last: center;
}

/* Special case for date inputs to keep icons but center text */
#quoteBuilderModal input[type="date"].form-input {
    text-align: center;
    display: flex;
    justify-content: center;
}

/* ============================================================================
   DETAILS SECTION - Centered Titel & Beschreibung
   ============================================================================ */

#quoteBuilderModal .quote-section:first-child .form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

#quoteBuilderModal .quote-section:first-child .form-label {
    text-align: center;
    width: 100%;
}

#quoteBuilderModal .quote-section:first-child textarea.form-input {
    min-height: 80px;
}

/* ============================================================================
   LEISTUNGEN ITEMS - Full Width Bezeichnung & Beschreibung
   ============================================================================ */

#quoteBuilderModal .quote-item-editor .item-title-group,
#quoteBuilderModal .quote-item-editor .item-description-group {
    width: 100%;
    align-self: center;
    margin-bottom: var(--spacing-sm);
}

#quoteBuilderModal .quote-item-editor .item-title-group .form-input,
#quoteBuilderModal .quote-item-editor .item-description-group .form-input {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

/* Quote item pricing row - horizontal layout */
#quoteBuilderModal .quote-item-editor .item-pricing-row {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-md);
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: var(--spacing-sm);
}

#quoteBuilderModal .quote-item-editor .item-pricing-row .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

/* Pricing type dropdown */
#quoteBuilderModal .quote-item-editor .pricing-type-group {
    flex: 0 0 160px;
    min-width: 160px;
}

/* Quantity field */
#quoteBuilderModal .quote-item-editor .item-quantity-group {
    flex: 0 0 96px;
    max-width: 96px;
}

/* Price field */
#quoteBuilderModal .quote-item-editor .item-price-group {
    flex: 1;
    min-width: 160px;
}

/* Bottom row (Total only) */
#quoteBuilderModal .quote-item-editor .item-bottom-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: var(--spacing-xs);
}

/* Quote item header actions (Optional toggle + Remove) */
#quoteBuilderModal .quote-item-editor .quote-item-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

#quoteBuilderModal .quote-item-editor .quote-item-actions .quote-item-optional-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
}

#quoteBuilderModal .quote-item-editor .quote-item-actions .quote-item-optional-toggle input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

#quoteBuilderModal .quote-item-editor .quote-item-actions .quote-item-optional-toggle span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35em 0.6em;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--glass-secondary);
    color: var(--text-secondary);
    font-size: 0.75em;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#quoteBuilderModal .quote-item-editor .quote-item-actions .quote-item-optional-toggle input:checked + span {
    background: rgba(255, 149, 0, 0.14);
    border-color: var(--ios-system-orange);
    color: var(--text-primary);
}

#quoteBuilderModal .quote-item-editor .quote-item-actions .quote-item-optional-toggle input:focus-visible + span {
    outline: 2px solid var(--ios-system-orange);
    outline-offset: 2px;
}

/* ============================================================================
   VARIABLE COSTS - Prominent Toggle Section
   ============================================================================ */

#quoteBuilderModal .variable-costs-section {
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) !important;
    border: 1px solid var(--glass-border);
}

#quoteBuilderModal .variable-costs-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
}

/* Fix toggle button - Smaller as requested */
#quoteBuilderModal .variable-costs-toggle .toggle-switch {
    flex-shrink: 0;
}

#quoteBuilderModal .variable-costs-info {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

#quoteBuilderModal .variable-costs-label {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
}

#quoteBuilderModal .variable-costs-hint {
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

/* iOS-style toggle switch - COMPACT VERSION */
#quoteBuilderModal .toggle-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

#quoteBuilderModal .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

#quoteBuilderModal .toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: 0.3s;
}

#quoteBuilderModal .toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 1px;
    bottom: 1px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

#quoteBuilderModal .toggle-switch input:checked + .toggle-slider {
    background: var(--ios-system-green);
    border-color: var(--ios-system-green);
}

#quoteBuilderModal .toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

#quoteBuilderModal .variable-costs-fields {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--glass-border);
}

#quoteBuilderModal .variable-costs-fields .form-row {
    gap: var(--spacing-md);
    flex-wrap: nowrap;
}

#quoteBuilderModal .variable-costs-fields .flex-1 {
    flex: 1;
}

#quoteBuilderModal .variable-costs-fields .flex-2 {
    flex: 2;
}

/* ============================================================================
   PREISÜBERSICHT - MwSt field on right
   ============================================================================ */

#quoteBuilderModal .quote-pricing-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

#quoteBuilderModal .quote-pricing-row .form-label {
    margin-bottom: 0;
    white-space: nowrap;
}

#quoteBuilderModal .quote-pricing-row .form-input-sm {
    width: 100px;
    text-align: center;
}

/* ============================================================================
   TIMELINE SECTION - Proper Row Layout
   ============================================================================ */

#quoteBuilderModal .quote-section .form-row {
    gap: var(--spacing-md);
    flex-wrap: nowrap !important;
    width: 100%;
}

/* Leistungen: add-position button breathing room */
#quoteBuilderModal #addQuoteItemBtn {
    margin-right: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
}

/* Timeline: keep date fields on one row */
#quoteBuilderModal .timeline-dates-row {
    flex-direction: row;
    gap: var(--spacing-md);
    flex-wrap: nowrap !important;
    width: 100%;
}

#quoteBuilderModal .timeline-dates-row > .form-group {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

#quoteBuilderModal .quote-section .form-row > .form-group {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

#quoteBuilderModal .quote-section .form-row .form-group .form-label {
    text-align: center;
}

/* Duration row - Dauer + Einheit side by side on ONE row */
#quoteBuilderModal .duration-row {
    display: flex !important;
    flex-direction: row !important;
    gap: var(--spacing-md);
    flex-wrap: nowrap !important;
    align-items: flex-end;
}

#quoteBuilderModal .duration-row .form-group {
    flex: 1 1 0;
}

#quoteBuilderModal .duration-row .duration-unit-group {
    flex: 0 0 140px;
    max-width: 140px;
}

/* Margin bottom utility */
#quoteBuilderModal .mb-md {
    margin-bottom: var(--spacing-md);
}

/**
 * @file handover-protocol.css
 * @description Styles for the Handover Protocol (Übergabeprotokoll) page
 * @module css/pages/handover-protocol
 *
 * Features:
 * - Wizard step navigation
 * - Touch-optimized inputs for tablet use
 * - Full-screen signature capture
 * - Camera modal
 * - Status badges
 * - Progress bar
 */

/* ============================================================================
   PAGE LAYOUT
   ============================================================================ */

body[data-page^="handover-protocol"] {
    --handover-accent-start: #ff9a3d;
    --handover-accent-end: #ff6a1a;
    --handover-accent-solid: #ff7a1a;
    --handover-accent-shadow: rgba(255, 122, 26, 0.35);
    --handover-accent-gradient: linear-gradient(135deg, var(--handover-accent-start), var(--handover-accent-end));
    --handover-backlight:
        radial-gradient(120% 140% at 12% -10%, rgba(255, 185, 120, 0.55) 0%, rgba(255, 145, 85, 0.25) 45%, rgba(255, 120, 70, 0.12) 65%, transparent 75%),
        radial-gradient(120% 140% at 88% 0%, rgba(255, 210, 150, 0.45) 0%, rgba(255, 150, 90, 0.2) 55%, transparent 75%);
}

html[data-theme="light"] body[data-page^="handover-protocol"],
body[data-theme="light"][data-page^="handover-protocol"] {
    --handover-accent-start: #ffa24a;
    --handover-accent-end: #ff6f1c;
    --handover-accent-solid: #ff7a1a;
    --handover-accent-shadow: rgba(255, 122, 26, 0.28);
    --handover-backlight:
        radial-gradient(120% 140% at 10% -15%, rgba(255, 190, 130, 0.5) 0%, rgba(255, 150, 90, 0.22) 45%, rgba(255, 120, 70, 0.1) 65%, transparent 75%),
        radial-gradient(120% 140% at 90% 0%, rgba(255, 215, 155, 0.4) 0%, rgba(255, 155, 95, 0.18) 55%, transparent 75%);
}

html[data-theme="lightmodern"] body[data-page^="handover-protocol"],
body[data-theme="lightmodern"][data-page^="handover-protocol"] {
    --handover-accent-start: #ff9b46;
    --handover-accent-end: #ff6b1a;
    --handover-accent-solid: #ff7a1a;
    --handover-accent-shadow: rgba(255, 122, 26, 0.25);
    --handover-backlight:
        radial-gradient(120% 140% at 12% -10%, rgba(255, 180, 120, 0.45) 0%, rgba(255, 140, 85, 0.2) 45%, rgba(255, 110, 70, 0.1) 65%, transparent 75%),
        radial-gradient(120% 140% at 88% 0%, rgba(255, 205, 150, 0.35) 0%, rgba(255, 150, 95, 0.16) 55%, transparent 75%);
}

html[data-theme="dark"] body[data-page^="handover-protocol"],
body[data-theme="dark"][data-page^="handover-protocol"] {
    --handover-accent-start: #ff9a3d;
    --handover-accent-end: #ff5a17;
    --handover-accent-solid: #ff6a1a;
    --handover-accent-shadow: rgba(255, 106, 26, 0.45);
    --handover-backlight:
        radial-gradient(120% 140% at 12% -10%, rgba(255, 160, 95, 0.55) 0%, rgba(255, 120, 70, 0.35) 45%, rgba(255, 90, 50, 0.18) 65%, transparent 78%),
        radial-gradient(120% 140% at 90% 0%, rgba(255, 190, 125, 0.45) 0%, rgba(255, 120, 70, 0.28) 55%, transparent 78%);
}

html[data-theme="darkart"] body[data-page^="handover-protocol"],
body[data-theme="darkart"][data-page^="handover-protocol"] {
    --handover-accent-start: #ffb166;
    --handover-accent-end: #ff6a1a;
    --handover-accent-solid: #ff7a1a;
    --handover-accent-shadow: rgba(255, 122, 26, 0.5);
    --handover-backlight:
        radial-gradient(120% 140% at 12% -10%, rgba(255, 180, 120, 0.6) 0%, rgba(255, 130, 80, 0.4) 45%, rgba(255, 100, 60, 0.2) 65%, transparent 78%),
        radial-gradient(120% 140% at 88% 0%, rgba(255, 205, 145, 0.5) 0%, rgba(255, 140, 85, 0.3) 55%, transparent 78%);
}

html[data-theme="darkmodern"] body[data-page^="handover-protocol"],
body[data-theme="darkmodern"][data-page^="handover-protocol"] {
    --handover-accent-start: #ff9f4a;
    --handover-accent-end: #ff5a17;
    --handover-accent-solid: #ff6a1a;
    --handover-accent-shadow: rgba(255, 106, 26, 0.5);
    --handover-backlight:
        radial-gradient(120% 140% at 12% -10%, rgba(255, 170, 110, 0.6) 0%, rgba(255, 120, 75, 0.38) 45%, rgba(255, 90, 55, 0.2) 65%, transparent 78%),
        radial-gradient(120% 140% at 88% 0%, rgba(255, 200, 140, 0.5) 0%, rgba(255, 130, 80, 0.3) 55%, transparent 78%);
}

body[data-page^="handover-protocol"] .main-content {
    min-height: 100vh;
}

@media (max-width: 48em) {
    body[data-page^="handover-protocol"] .main-content {
        padding-left: 0;
        padding-bottom: var(--mobile-nav-height);
    }
}

/* ============================================================================
   PAGE HEADER
   ============================================================================ */

body[data-page^="handover-protocol"] .page-header {
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

@media (max-width: 48em) {
    body[data-page^="handover-protocol"] .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    body[data-page^="handover-protocol"] .page-header button {
        width: 100%;
    }
}

/* ============================================================================
   PROTOCOL LIST
   ============================================================================ */

body[data-page^="handover-protocol"] .protocol-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18em, 1fr));
    gap: var(--spacing-md);
}

body[data-page^="handover-protocol"] .protocol-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body[data-page^="handover-protocol"] .protocol-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body[data-page^="handover-protocol"] .protocol-card:active {
    transform: scale(0.98);
}

/* Status Badges */
body[data-page^="handover-protocol"] .status-badge {
    padding: 0.25em 0.75em;
    border-radius: var(--border-radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body[data-page^="handover-protocol"] .status-draft {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

body[data-page^="handover-protocol"] .status-sealed {
    background: var(--ios-system-green);
    color: var(--button-text-on-color);
}

body[data-page^="handover-protocol"] .status-pending {
    background: var(--ios-system-yellow);
    color: var(--text-primary);
}

/* Empty State */
body[data-page^="handover-protocol"] .empty-state .empty-icon {
    font-size: 4rem;
    opacity: 0.5;
}

/* ============================================================================
   WIZARD CONTAINER
   ============================================================================ */

body[data-page^="handover-protocol"] .wizard-container {
    max-width: 48em;
    margin: 0 auto;
}

/* Progress Bar */
body[data-page^="handover-protocol"] .wizard-progress {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--glass-primary);
    backdrop-filter: blur(10px);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-lg);
}

body[data-page^="handover-protocol"] .progress-bar {
    height: 0.5em;
    background: var(--glass-secondary);
    border-radius: var(--border-radius-full);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

body[data-page^="handover-protocol"] .progress-fill {
    height: 100%;
    background: var(--handover-accent-gradient);
    border-radius: var(--border-radius-full);
    transition: width 0.3s ease;
}

body[data-page^="handover-protocol"] .progress-steps {
    display: flex;
    justify-content: space-between;
    overflow-x: auto;
    gap: var(--spacing-xs);
    padding-bottom: var(--spacing-xs);
}

body[data-page^="handover-protocol"] .progress-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    background: var(--glass-secondary);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

body[data-page^="handover-protocol"] .progress-step.active {
    background: var(--handover-accent-gradient);
    transform: scale(1.1);
    box-shadow: 0 6px 18px var(--handover-accent-shadow);
}

body[data-page^="handover-protocol"] .progress-step.completed {
    background: var(--ios-system-green);
}

body[data-page^="handover-protocol"] .progress-step .step-icon {
    font-size: 1.25rem;
}

/* Wizard Content */
body[data-page^="handover-protocol"] .wizard-content {
    min-height: 24em;
}

/* Wizard Navigation */
body[data-page^="handover-protocol"] .wizard-nav {
    position: sticky;
    bottom: var(--spacing-md);
    background: var(--glass-primary);
    backdrop-filter: blur(10px);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-lg);
}

body[data-page^="handover-protocol"] .wizard-nav button {
    min-width: 8em;
}

/* ============================================================================
   FORM ELEMENTS (Touch-Optimized)
   ============================================================================ */

body[data-page^="handover-protocol"] .glass-input {
    min-height: 2.75em;
    font-size: 1rem;
    -webkit-appearance: none;
}

body[data-page^="handover-protocol"] select.glass-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

body[data-page^="handover-protocol"] textarea.glass-input {
    resize: vertical;
    min-height: 6em;
}

/* Room Items */
body[data-page^="handover-protocol"] .room-item,
body[data-page^="handover-protocol"] .meter-item,
body[data-page^="handover-protocol"] .damage-item {
    transition: transform 0.2s ease;
}

body[data-page^="handover-protocol"] .room-item:focus-within,
body[data-page^="handover-protocol"] .meter-item:focus-within,
body[data-page^="handover-protocol"] .damage-item:focus-within {
    transform: scale(1.01);
    box-shadow: 0 0 0 2px var(--handover-accent-solid);
}

/* ============================================================================
   SIGNATURE MODAL
   ============================================================================ */

body[data-page^="handover-protocol"] .signature-modal-content {
    background: var(--glass-primary);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-xl);
    width: 100%;
    max-width: 48em;
    margin: var(--spacing-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body[data-page^="handover-protocol"] .signature-header,
body[data-page^="handover-protocol"] .signature-footer {
    background: var(--glass-secondary);
}

body[data-page^="handover-protocol"] .signature-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    min-height: 20em;
}

body[data-page^="handover-protocol"] #signatureCanvas {
    width: 100%;
    height: 16em;
    border: 2px dashed var(--glass-border);
    border-radius: var(--border-radius-lg);
    cursor: crosshair;
    touch-action: none;
}

/* Full-screen signature for mobile */
@media (max-width: 48em) {
    body[data-page^="handover-protocol"] .signature-modal-content {
        margin: 0;
        border-radius: 0;
        height: 100vh;
        max-width: 100%;
    }

    body[data-page^="handover-protocol"] .signature-body {
        flex: 1;
    }

    body[data-page^="handover-protocol"] #signatureCanvas {
        height: 100%;
        border: none;
        border-radius: 0;
    }
}

/* ============================================================================
   CAMERA MODAL
   ============================================================================ */

/* Camera modal must appear above defect modal (z-index: 10001) */
body[data-page^="handover-protocol"] #cameraModal {
    z-index: 10002;
}

body[data-page^="handover-protocol"] .camera-modal-content {
    background: black;
    border-radius: var(--border-radius-xl);
    width: 100%;
    max-width: 48em;
    margin: var(--spacing-lg);
    overflow: hidden;
}

body[data-page^="handover-protocol"] .camera-header {
    background: rgba(0, 0, 0, 0.7);
}

body[data-page^="handover-protocol"] .camera-header h3 {
    color: var(--button-text-on-color);
}

body[data-page^="handover-protocol"] .camera-body {
    position: relative;
    background: black;
}

body[data-page^="handover-protocol"] #cameraVideo {
    width: 100%;
    max-height: 60vh;
    object-fit: cover;
}

body[data-page^="handover-protocol"] .camera-footer {
    background: rgba(0, 0, 0, 0.7);
}

body[data-page^="handover-protocol"] #btnCapturePhoto {
    border-radius: 50%;
    width: 4em;
    height: 4em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Full-screen camera for mobile */
@media (max-width: 48em) {
    body[data-page^="handover-protocol"] .camera-modal-content {
        margin: 0;
        border-radius: 0;
        height: 100vh;
        max-width: 100%;
        display: flex;
        flex-direction: column;
    }

    body[data-page^="handover-protocol"] .camera-body {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body[data-page^="handover-protocol"] #cameraVideo {
        max-height: none;
        height: 100%;
    }
}

/* ============================================================================
   HAND TO TENANT SCREEN
   ============================================================================ */

body[data-page^="handover-protocol"] .hand-to-tenant-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-primary);
    backdrop-filter: blur(20px);
    padding: var(--spacing-lg);
}

body[data-page^="handover-protocol"] .hand-to-tenant-screen .glass-card {
    max-width: 32em;
    width: 100%;
}

body[data-page^="handover-protocol"] .hand-icon {
    font-size: 6rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ============================================================================
   COMPLETION SCREEN
   ============================================================================ */

body[data-page^="handover-protocol"] .completion-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-primary);
    backdrop-filter: blur(20px);
    padding: var(--spacing-lg);
}

body[data-page^="handover-protocol"] .completion-screen .glass-card {
    max-width: 32em;
    width: 100%;
}

body[data-page^="handover-protocol"] .completion-icon {
    font-size: 6rem;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ============================================================================
   MODAL OVERLAY
   ============================================================================ */

body[data-page^="handover-protocol"] .modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

body[data-page^="handover-protocol"] .modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

body[data-page^="handover-protocol"] #newProtocolModal .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    width: min(32rem, 92vw);
    padding: var(--spacing-lg);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

body[data-page^="handover-protocol"] #newProtocolModal::before {
    content: '';
    position: absolute;
    width: min(36rem, 96vw);
    height: min(32rem, 85vh);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--handover-backlight);
    filter: blur(26px);
    opacity: 0.9;
    z-index: 0;
    pointer-events: none;
}

body[data-page^="handover-protocol"] #newProtocolModal .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

body[data-page^="handover-protocol"] #newProtocolModal #newProtocolForm {
    gap: var(--spacing-md);
}

/* ============================================================================
   RADIO/CHECKBOX STYLES
   ============================================================================ */

body[data-page^="handover-protocol"] .radio-label {
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-page^="handover-protocol"] .radio-label:has(input:checked) {
    background: var(--handover-accent-gradient);
    color: var(--button-text-on-color);
}

body[data-page^="handover-protocol"] .radio-label input {
    display: none;
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

body[data-page^="handover-protocol"] .toast-container {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

body[data-page^="handover-protocol"] .toast {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body[data-page^="handover-protocol"] .toast-success {
    background: var(--ios-system-green);
    color: var(--button-text-on-color);
}

body[data-page^="handover-protocol"] .toast-error {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
}

body[data-page^="handover-protocol"] .toast-info {
    background: var(--handover-accent-solid);
    color: var(--button-text-on-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================================================
   LOADING SPINNER
   ============================================================================ */

body[data-page^="handover-protocol"] .loading-spinner {
    display: flex;
    justify-content: center;
    padding: var(--spacing-xl);
}

body[data-page^="handover-protocol"] .spinner {
    width: 2.5em;
    height: 2.5em;
    border: 3px solid var(--glass-secondary);
    border-top-color: var(--handover-accent-solid);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   SIGNATURE PREVIEW
   ============================================================================ */

body[data-page^="handover-protocol"] .signature-preview img {
    max-height: 8em;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    background: white;
    padding: var(--spacing-sm);
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

body[data-page^="handover-protocol"] .hidden {
    display: none !important;
}

body[data-page^="handover-protocol"] .cursor-pointer {
    cursor: pointer;
}

/* Legacy spacing utilities for this page (pre-v2 class names) */
body[data-page^="handover-protocol"] .p-sm { padding: var(--spacing-sm); }
body[data-page^="handover-protocol"] .p-md { padding: var(--spacing-md); }
body[data-page^="handover-protocol"] .p-lg { padding: var(--spacing-lg); }
body[data-page^="handover-protocol"] .p-xl { padding: var(--spacing-xl); }
body[data-page^="handover-protocol"] .p-xxl { padding: var(--spacing-2xl); }

body[data-page^="handover-protocol"] .px-md { padding-left: var(--spacing-md); padding-right: var(--spacing-md); }
body[data-page^="handover-protocol"] .px-lg { padding-left: var(--spacing-lg); padding-right: var(--spacing-lg); }
body[data-page^="handover-protocol"] .px-xl { padding-left: var(--spacing-xl); padding-right: var(--spacing-xl); }
body[data-page^="handover-protocol"] .px-xxl { padding-left: var(--spacing-2xl); padding-right: var(--spacing-2xl); }

body[data-page^="handover-protocol"] .py-sm { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
body[data-page^="handover-protocol"] .py-md { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
body[data-page^="handover-protocol"] .py-lg { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }
body[data-page^="handover-protocol"] .py-xl { padding-top: var(--spacing-xl); padding-bottom: var(--spacing-xl); }

body[data-page^="handover-protocol"] .mb-xs { margin-bottom: var(--spacing-xs); }
body[data-page^="handover-protocol"] .mb-sm { margin-bottom: var(--spacing-sm); }
body[data-page^="handover-protocol"] .mb-md { margin-bottom: var(--spacing-md); }
body[data-page^="handover-protocol"] .mb-lg { margin-bottom: var(--spacing-lg); }
body[data-page^="handover-protocol"] .mb-xl { margin-bottom: var(--spacing-xl); }

body[data-page^="handover-protocol"] .mt-lg { margin-top: var(--spacing-lg); }

body[data-page^="handover-protocol"] .gap-sm { gap: var(--spacing-sm); }
body[data-page^="handover-protocol"] .gap-md { gap: var(--spacing-md); }
body[data-page^="handover-protocol"] .gap-lg { gap: var(--spacing-lg); }
body[data-page^="handover-protocol"] .gap-xl { gap: var(--spacing-xl); }

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 48em) {
    body[data-page^="handover-protocol"] .wizard-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        border-radius: 0;
        border-top: 1px solid var(--glass-border);
    }

    body[data-page^="handover-protocol"] .wizard-content {
        margin-bottom: 5em; /* Space for fixed nav */
    }

    body[data-page^="handover-protocol"] .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    body[data-page^="handover-protocol"] .toast-container {
        bottom: 5em; /* Above fixed nav */
        left: var(--spacing-md);
        right: var(--spacing-md);
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    body[data-page^="handover-protocol"] .wizard-progress,
    body[data-page^="handover-protocol"] .wizard-nav,
    body[data-page^="handover-protocol"] .toast-container,
    body[data-page^="handover-protocol"] #sidebar-container {
        display: none !important;
    }

    body[data-page^="handover-protocol"] .main-content {
        padding-left: 0;
    }
}

/**
 * Contract Viewer Page Styles
 *
 * PURPOSE:
 * Styles for the public shared contract viewing page.
 * Theme-aware using COEUS design system variables.
 * Professional legal document appearance.
 *
 * DEPENDENCIES:
 * - /css/coeus-master.css (master CSS)
 * - Theme variables from design-tokens.css
 *
 * COMPONENTS:
 * - Header with logo and access badge
 * - Loading/Error/Content states
 * - Contract document (main content)
 * - Parties, Property, Duration/Rent sections
 * - Contract modules
 * - AGB and Erklaerungen (with structured legal document formatting)
 * - Signature section with canvas
 * - Modal for signature (enhanced with sunset orange accents)
 * - Print styles
 *
 * LEGAL DOCUMENT FORMATTING:
 * - .legal-doc-title: Centered document title with border
 * - .legal-doc-subtitle: Legal reference subtitle (italicized)
 * - .legal-intro: Introduction paragraph with accent border
 * - .legal-section: Container for each paragraph/section
 * - .legal-section-header: Section header (§1, Paragraph 1, etc.)
 * - .legal-section-number: Section number styling
 * - .legal-section-title: Section title (uppercase)
 * - .legal-items: Container for clause items
 * - .legal-item: Individual clause (1.1, 1.2, etc.)
 * - .legal-item.important: Highlighted clause with legal reference
 * - .legal-item-number: Clause number styling
 * - .legal-item-text: Clause text content
 *
 * SIGNATURE MODAL FEATURES:
 * - Smooth fade-in and slide-up animations
 * - Sunset orange (#FF9500) checkbox accent color
 * - Visual feedback on checkbox checked state
 * - Improved spacing and visual hierarchy
 * - Better button sizing and hover effects
 *
 * PRINT STYLES:
 * - A4 page setup with proper margins
 * - Professional contract typography (Times New Roman)
 * - Clean table-based layouts for parties and signatures
 * - Proper page breaks for AGB/Erklaerungen sections
 * - Structured legal document print formatting
 * - Signature lines with underscores
 * - Page number footer
 */

/* ============================================ */
/*              PAGE LAYOUT                     */
/* ============================================ */

[data-page="contract-viewer"] {
    min-height: 100vh;
}

[data-page="contract-viewer"] .container {
    max-width: 56em;
}

/* ============================================ */
/*              HEADER                          */
/* ============================================ */

.contract-viewer-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

.contract-viewer-header .font-logo {
    font-family: var(--font-logo, 'Bodoni Moda', serif);
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ============================================ */
/*              ACCESS BADGE                    */
/* ============================================ */

.access-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    transition: all 0.2s ease;
}

.access-badge.access-view {
    border: 1px solid var(--ios-system-gray);
}

.access-badge.access-download {
    border: 1px solid var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.1);
}

.access-badge.access-download .caption {
    color: var(--ios-system-orange);
}

.access-badge.access-sign {
    border: 1px solid var(--ios-system-green);
    background: rgba(52, 199, 89, 0.1);
}

.access-badge.access-sign .caption {
    color: var(--ios-system-green);
}

/* ============================================ */
/*              CONTRACT DOCUMENT               */
/* ============================================ */

.contract-document {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.contract-header {
    background: linear-gradient(180deg, var(--glass-secondary) 0%, var(--glass-primary) 100%);
}

.contract-title {
    font-family: var(--font-serif);
    font-size: 2em;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.contract-subtitle {
    font-size: 1em;
    opacity: 0.8;
}

/* ============================================ */
/*              BORDER UTILITIES                */
/* ============================================ */

.border-b {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

.border-t {
    border-top-width: 1px;
    border-top-style: solid;
}

.border-glass {
    border-color: var(--glass-border);
}

.border-dashed {
    border-style: dashed;
}

/* ============================================ */
/*              CONTRACT SECTIONS               */
/* ============================================ */

.contract-section {
    transition: background 0.2s ease;
}

.section-title {
    font-family: var(--font-serif);
    letter-spacing: 0.01em;
    position: relative;
    padding-left: 1em;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 3px;
    background: var(--ios-system-orange);
    border-radius: 2px;
}

/* ============================================ */
/*              PARTIES SECTION                 */
/* ============================================ */

.parties-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.party-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
}

/* ============================================ */
/*              PROPERTY SECTION                */
/* ============================================ */

.property-details {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
}

/* ============================================ */
/*              CONTRACT MODULES                */
/* ============================================ */

.modules-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contract-module {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    transition: border-color 0.2s ease;
}

.contract-module:hover {
    border-color: var(--ios-system-orange);
}

.module-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.module-number {
    font-family: var(--font-serif);
    font-size: 1.1em;
    font-weight: 600;
    color: var(--ios-system-orange);
    min-width: 2em;
}

.module-title {
    font-family: var(--font-serif);
    font-weight: 500;
}

.module-content {
    line-height: 1.7;
}

.legal-refs {
    font-style: italic;
    font-size: 0.85em;
    color: var(--text-tertiary);
    margin-top: 0.2em;
    margin-bottom: 1em;
}

/* ============================================ */
/*         EMPLOYMENT CONTRACT CLASSES          */
/* ============================================ */

.contract-logo-header {
    text-align: right;
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 2px solid var(--glass-border);
}

.contract-logo {
    max-height: 3.5em;
    max-width: 12em;
    object-fit: contain;
}

.contract-preamble {
    background: var(--glass-primary);
    border-left: 3px solid var(--ios-system-orange);
    padding: 1em 1.2em;
    margin-bottom: 1.5em;
    border-radius: 0 0.25em 0.25em 0;
    font-style: italic;
    color: var(--text-secondary);
}

.contract-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
    margin: 0.8em 0 0.5em;
}

.party-block {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.375em;
    padding: 1em 1.2em;
}

.party-label {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 0.4em;
}

.signature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3em;
    margin-top: 2.5em;
}

.signature-block {
    text-align: center;
}

.signature-label {
    font-size: 0.85em;
    color: var(--text-tertiary);
    margin-bottom: 3.5em;
}

.signature-line {
    border-bottom: 1px solid var(--text-primary);
    margin-bottom: 0.4em;
}

.signature-name {
    font-size: 0.9em;
}

@media (max-width: 40em) {
    .contract-parties {
        grid-template-columns: 1fr;
    }
    .signature-grid {
        grid-template-columns: 1fr;
        gap: 1.5em;
    }
}

@media print {
    .contract-logo-header {
        border-bottom-color: #e0e0e0;
    }
    .contract-logo {
        max-height: 2.5em;
    }
    .contract-preamble {
        background: #f7f7f2;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .party-block {
        background: #f9f9f6;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ============================================ */
/*              APPENDICES                      */
/* ============================================ */

.appendices-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.appendix-item {
    transition: border-color 0.2s ease;
}

.appendix-item:hover {
    border-color: var(--ios-system-orange);
}

.appendix-icon {
    background: var(--glass-secondary);
}

/* ============================================ */
/*              TERMS CONTENT                   */
/* ============================================ */

.terms-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1.5rem;
    line-height: 1.8;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.terms-content::-webkit-scrollbar {
    width: 6px;
}

.terms-content::-webkit-scrollbar-track {
    background: var(--glass-primary);
    border-radius: 3px;
}

.terms-content::-webkit-scrollbar-thumb {
    background: var(--glass-secondary);
    border-radius: 3px;
}

.terms-content::-webkit-scrollbar-thumb:hover {
    background: var(--glass-hover);
}

/* ============================================ */
/*         LEGAL DOCUMENT TYPOGRAPHY           */
/* ============================================ */

/* Main document title within terms */
.terms-content .legal-doc-title {
    font-family: var(--font-serif);
    font-size: 1.5em;
    font-weight: 600;
    text-align: center;
    margin: 0 0 0.5em 0;
    padding-bottom: 0.75em;
    border-bottom: 2px solid var(--glass-border);
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

/* Subtitle / legal reference */
.terms-content .legal-doc-subtitle {
    font-family: var(--font-sans);
    font-size: 0.9em;
    text-align: center;
    color: var(--text-secondary);
    margin: 0 0 1.5em 0;
    font-style: italic;
}

/* Introduction paragraph */
.terms-content .legal-intro {
    font-family: var(--font-sans);
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 2em 0;
    padding: 1em;
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--ios-system-orange);
}

/* Section (Paragraph) container */
.terms-content .legal-section {
    margin: 0 0 2em 0;
    padding: 0;
}

/* Section header (e.g., "Paragraph 1 VERTRAGSGEGENSTAND" or "§1 MIETGEGENSTAND") */
.terms-content .legal-section-header {
    display: flex;
    align-items: baseline;
    gap: 0.75em;
    margin: 0 0 1em 0;
    padding: 0.75em 1em;
    background: linear-gradient(135deg, var(--glass-secondary) 0%, var(--glass-primary) 100%);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--ios-system-orange);
}

.terms-content .legal-section-number {
    font-family: var(--font-serif);
    font-size: 1.1em;
    font-weight: 700;
    color: var(--ios-system-orange);
    white-space: nowrap;
}

.terms-content .legal-section-title {
    font-family: var(--font-serif);
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Sub-section items container */
.terms-content .legal-items {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    padding-left: 0.5em;
}

/* Individual clause/item (e.g., "1.1 Der Vermieter...") */
.terms-content .legal-item {
    display: flex;
    align-items: flex-start;
    gap: 1em;
    padding: 0.75em 1em;
    background: transparent;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.terms-content .legal-item:hover {
    background: var(--glass-secondary);
}

.terms-content .legal-item-number {
    font-family: var(--font-sans);
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-tertiary);
    min-width: 2.5em;
    flex-shrink: 0;
}

.terms-content .legal-item-text {
    font-family: var(--font-sans);
    font-size: 0.95em;
    line-height: 1.7;
    color: var(--text-secondary);
    flex: 1;
}

/* Important/emphasized items (bold clauses) */
.terms-content .legal-item.important {
    background: var(--glass-secondary);
    border-left: 3px solid var(--ios-system-orange, #FF9500);
}

.terms-content .legal-item.important .legal-item-number {
    color: var(--ios-system-orange, #FF9500);
    font-weight: 700;
}

.terms-content .legal-item.important .legal-item-text {
    font-weight: 500;
    color: var(--text-primary);
}

/* Fallback plain text styling */
.terms-content .legal-plain-text {
    font-family: var(--font-sans);
    font-size: 0.95em;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* ============================================ */
/*              SIGNATURES                      */
/* ============================================ */

.signatures-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.signature-box {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
}

.signature-placeholder {
    background: var(--glass-secondary);
    min-height: 6rem;
}

.signature-placeholder.signed {
    background: rgba(52, 199, 89, 0.1);
    border-color: var(--ios-system-green);
}

/* ============================================ */
/*              SIGNATURE MODAL                 */
/* ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modal-fade-in 0.25s ease-out;
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

#signatureModal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    animation: modal-slide-up 0.3s ease-out;
}

@keyframes modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(1.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
#signatureModal .flex-between {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

#signatureModal .heading-2 {
    font-family: var(--font-serif);
    letter-spacing: 0.01em;
}

#signatureModal #closeSignatureModal {
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#signatureModal #closeSignatureModal:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Signature Canvas Container */
.signature-canvas-container {
    background: var(--glass-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.signature-canvas-container p.caption {
    margin-bottom: 1rem;
    font-weight: 500;
}

.signature-canvas {
    background: white;
    cursor: crosshair;
    touch-action: none;
    border-radius: var(--radius-md);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.signature-canvas-container #clearSignature {
    margin-top: 1rem;
}

/* Confirmation Section - Sunset Orange Checkbox */
.confirmation-section {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.confirmation-section:has(input:checked) {
    border-color: #FF9500;
    background: rgba(255, 149, 0, 0.05);
}

.confirmation-section label {
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.confirmation-section input[type="checkbox"] {
    width: 1.5rem;
    height: 1.5rem;
    accent-color: #FF9500;
    flex-shrink: 0;
    margin-top: 0.125rem;
    cursor: pointer;
    border-radius: 4px;
}

.confirmation-section span.caption {
    line-height: 1.6;
}

/* Modal Action Buttons */
#signatureModal .flex.gap-4.justify-end {
    gap: 1rem;
    padding-top: 0.5rem;
}

#signatureModal #cancelSignature {
    min-width: 8em;
}

#signatureModal #submitSignature {
    min-width: 14em;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

#signatureModal #submitSignature:not(:disabled):hover {
    transform: translateY(-1px);
}

#signatureModal #submitSignature:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================ */
/*              ACTION BUTTONS                  */
/* ============================================ */

#actionsSection .glass-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12em;
}

#actionsSection .glass-button svg {
    flex-shrink: 0;
}

/* ============================================ */
/*              FOOTER                          */
/* ============================================ */

.contract-viewer-footer {
    border-top: 1px solid var(--glass-border);
}

.contract-viewer-footer .font-logo {
    font-family: var(--font-logo, 'Bodoni Moda', serif);
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ============================================ */
/*              LOADING SPINNER                 */
/* ============================================ */

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================ */
/*              STATE VISIBILITY                */
/* ============================================ */

.state-hidden {
    display: none !important;
}

/* ============================================ */
/*              TEXT UTILITIES                  */
/* ============================================ */

.text-ios-green {
    color: var(--ios-system-green);
}

/* ============================================ */
/*              RESPONSIVE                      */
/* ============================================ */

@media (max-width: 48em) {
    .parties-grid,
    .signatures-grid {
        grid-template-columns: 1fr;
    }

    .contract-viewer-header .flex-between {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    #actionsSection .flex {
        flex-direction: column;
    }

    #actionsSection .glass-button {
        width: 100%;
    }

    .contract-title {
        font-size: 1.5em;
    }

    .section-title {
        font-size: 1.1em;
    }

    .module-number {
        font-size: 1em;
    }
}

/* ============================================ */
/*              PRINT STYLES                    */
/* ============================================ */

@media print {
    /* ========== PAGE SETUP ========== */
    @page {
        size: A4;
        margin: 20mm 15mm 25mm 15mm;
    }

    @page :first {
        margin-top: 15mm;
    }

    /* ========== HIDE NON-PRINT ELEMENTS ========== */
    .contract-viewer-header,
    #actionsSection,
    .contract-viewer-footer,
    #accessBadge,
    #signBtn,
    #signatureModal,
    .loading-spinner {
        display: none !important;
    }

    /* ========== RESET BACKGROUNDS ========== */
    html,
    body,
    [data-page="contract-viewer"],
    .radix-themes,
    .ios-container {
        background: white !important;
        color: #000 !important;
        font-size: 11pt !important;
        line-height: 1.5 !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* ========== CONTRACT DOCUMENT STYLING ========== */
    .contract-document {
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .contract-header {
        background: white !important;
        text-align: center !important;
        padding: 0 0 10mm 0 !important;
        margin-bottom: 8mm !important;
        border-bottom: 2pt solid #000 !important;
    }

    .contract-title {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 18pt !important;
        font-weight: bold !important;
        letter-spacing: 0.1em !important;
        text-transform: uppercase !important;
        margin-bottom: 2mm !important;
        color: #000 !important;
    }

    .contract-subtitle {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 10pt !important;
        font-style: italic !important;
        color: #444 !important;
    }

    /* ========== GLASS ELEMENTS RESET ========== */
    .glass-card,
    .glass-container-thin,
    .contract-module,
    .party-card,
    .property-details,
    .signature-box {
        background: white !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    /* ========== SECTION STYLING ========== */
    .contract-section {
        page-break-inside: avoid;
        padding: 4mm 0 !important;
        border-bottom: 0.5pt solid #ccc !important;
        margin-bottom: 0 !important;
    }

    .section-title {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 12pt !important;
        font-weight: bold !important;
        color: #000 !important;
        padding-left: 0 !important;
        margin-bottom: 4mm !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
    }

    .section-title::before {
        display: none !important;
    }

    /* ========== PARTIES GRID ========== */
    .parties-grid {
        display: table !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .parties-grid > .party-card {
        display: table-cell !important;
        width: 50% !important;
        vertical-align: top !important;
        padding: 3mm 5mm 3mm 0 !important;
    }

    .parties-grid > .party-card:last-child {
        padding-right: 0 !important;
        padding-left: 5mm !important;
        border-left: 0.5pt solid #ccc !important;
    }

    .party-card h3 {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 9pt !important;
        font-weight: bold !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        margin-bottom: 2mm !important;
        color: #666 !important;
    }

    /* ========== PROPERTY DETAILS ========== */
    .property-details {
        padding: 3mm 0 !important;
    }

    .property-details .grid {
        display: table !important;
        width: 100% !important;
    }

    .property-details .grid > div {
        display: table-cell !important;
        width: 25% !important;
        padding: 2mm 3mm !important;
        vertical-align: top !important;
    }

    /* ========== FINANCIAL GRID ========== */
    .contract-section .grid-cols-2 {
        display: table !important;
        width: 100% !important;
    }

    .contract-section .grid-cols-2 > div {
        display: table-cell !important;
        width: 50% !important;
        vertical-align: top !important;
        padding: 3mm !important;
    }

    .contract-section .grid-cols-2 > div:first-child {
        padding-left: 0 !important;
        padding-right: 5mm !important;
    }

    .contract-section .grid-cols-2 > div:last-child {
        padding-right: 0 !important;
        padding-left: 5mm !important;
        border-left: 0.5pt solid #ccc !important;
    }

    /* ========== CONTRACT MODULES ========== */
    .modules-container {
        gap: 0 !important;
    }

    .contract-module {
        padding: 3mm 0 !important;
        border-bottom: 0.5pt dotted #ddd !important;
        page-break-inside: avoid;
    }

    .contract-module:last-child {
        border-bottom: none !important;
    }

    .module-header {
        margin-bottom: 2mm !important;
    }

    .module-number {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 10pt !important;
        font-weight: bold !important;
        color: #000 !important;
        min-width: 2.5em !important;
    }

    .module-title {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 10pt !important;
        font-weight: bold !important;
    }

    .module-content {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 10pt !important;
        line-height: 1.6 !important;
        text-align: justify !important;
        color: #000 !important;
    }

    /* ========== TERMS CONTENT ========== */
    .terms-content {
        max-height: none !important;
        overflow: visible !important;
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 9pt !important;
        line-height: 1.5 !important;
        text-align: justify !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    /* Legal document elements for print */
    .terms-content .legal-doc-title {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 14pt !important;
        font-weight: bold !important;
        text-align: center !important;
        margin: 0 0 2mm 0 !important;
        padding-bottom: 3mm !important;
        border-bottom: 1pt solid #000 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.1em !important;
    }

    .terms-content .legal-doc-subtitle {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 9pt !important;
        text-align: center !important;
        font-style: italic !important;
        color: #444 !important;
        margin: 0 0 5mm 0 !important;
    }

    .terms-content .legal-intro {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 9pt !important;
        line-height: 1.5 !important;
        text-align: justify !important;
        margin: 0 0 5mm 0 !important;
        padding: 3mm !important;
        background: #f5f5f5 !important;
        border: none !important;
        border-left: 2pt solid #666 !important;
    }

    .terms-content .legal-section {
        margin: 0 0 4mm 0 !important;
        page-break-inside: avoid;
    }

    .terms-content .legal-section-header {
        background: transparent !important;
        border: none !important;
        border-left: 2pt solid #000 !important;
        padding: 1mm 0 1mm 3mm !important;
        margin: 0 0 2mm 0 !important;
    }

    .terms-content .legal-section-number {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 10pt !important;
        font-weight: bold !important;
        color: #000 !important;
    }

    .terms-content .legal-section-title {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 10pt !important;
        font-weight: bold !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        color: #000 !important;
    }

    .terms-content .legal-items {
        padding-left: 0 !important;
        gap: 1mm !important;
    }

    .terms-content .legal-item {
        padding: 1mm 0 !important;
        background: transparent !important;
        border: none !important;
        page-break-inside: avoid;
    }

    .terms-content .legal-item.important {
        background: transparent !important;
        border-left: 1pt solid #666 !important;
        padding-left: 2mm !important;
    }

    .terms-content .legal-item-number {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 9pt !important;
        font-weight: bold !important;
        color: #000 !important;
        min-width: 8mm !important;
    }

    .terms-content .legal-item-text {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 9pt !important;
        line-height: 1.5 !important;
        text-align: justify !important;
        color: #000 !important;
    }

    .terms-content .legal-item.important .legal-item-text {
        font-weight: normal !important;
    }

    /* ========== TEXT COLORS FOR PRINT ========== */
    .text-primary,
    .body-text,
    .heading-1,
    .heading-2,
    .heading-3 {
        color: #000 !important;
    }

    .text-secondary,
    .text-tertiary,
    .caption,
    .form-label {
        color: #444 !important;
    }

    /* ========== TYPOGRAPHY OVERRIDES ========== */
    .body-text,
    .caption,
    p {
        font-family: 'Times New Roman', Georgia, serif !important;
    }

    .form-label {
        font-family: 'Times New Roman', Georgia, serif !important;
        font-size: 8pt !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
    }

    /* ========== SIGNATURES SECTION ========== */
    #signaturesSection {
        page-break-before: always;
        padding-top: 10mm !important;
    }

    .signatures-grid {
        display: table !important;
        width: 100% !important;
        margin-top: 10mm !important;
    }

    .signatures-grid > .signature-box {
        display: table-cell !important;
        width: 50% !important;
        vertical-align: top !important;
        padding: 5mm !important;
    }

    .signatures-grid > .signature-box:first-child {
        padding-left: 0 !important;
        padding-right: 10mm !important;
    }

    .signatures-grid > .signature-box:last-child {
        padding-right: 0 !important;
        padding-left: 10mm !important;
    }

    .signature-placeholder {
        min-height: 20mm !important;
        border: none !important;
        border-bottom: 1pt solid #000 !important;
        border-radius: 0 !important;
        background: transparent !important;
        margin-bottom: 3mm !important;
    }

    .signature-placeholder.signed {
        background: transparent !important;
    }

    .signature-meta {
        font-size: 8pt !important;
    }

    /* ========== APPENDICES ========== */
    .appendices-container {
        gap: 2mm !important;
    }

    .appendix-item {
        padding: 2mm 0 !important;
        border: none !important;
        border-bottom: 0.5pt dotted #ccc !important;
    }

    .appendix-icon {
        display: none !important;
    }

    /* ========== PAGE BREAKS ========== */
    #modulesSection {
        page-break-before: auto;
    }

    #erklaerungSection,
    #agbSection {
        page-break-before: always;
    }

    /* ========== BORDER UTILITIES PRINT ========== */
    .border-b,
    .border-t {
        border-color: #ccc !important;
    }

    .border-glass {
        border-color: #ccc !important;
    }

    /* ========== HIDE INTERACTIVE ELEMENTS ========== */
    button,
    .glass-button {
        display: none !important;
    }

    /* ========== FOOTER FOR EACH PAGE ========== */
    .contract-document::after {
        content: "Seite " counter(page);
        position: fixed;
        bottom: 10mm;
        right: 15mm;
        font-family: 'Times New Roman', Georgia, serif;
        font-size: 8pt;
        color: #666;
    }
}

/**
 * @file vendor-employee-management.css
 * @filepath public/css/pages/vendor-employee-management.css
 * @description Styles for the vendor employee management page (Personalkosten)
 * @created 2026-02-06
 * @updated 2026-02-09
 * @updated 2026-02-28 - Details modal: viewport-constrained with internal scroll, compact 3-col info grid, 4-across summary strip
 * @updated 2026-02-28 - Added contract attachments list/row styles
 *
 * Layout: Dashboard view (summary + employee grid), Calendar view (FullCalendar),
 *         Team Chat view (two-column conversations + messages)
 *
 * Features:
 * - View switcher (Dashboard / Kalender / Team Chat)
 * - Collapsible filter panel with multi-select dropdowns
 * - Employee cards with earnings heatmap and skill badges
 * - FullCalendar theme overrides for employee scheduling
 * - Two-column team chat layout
 * - Employment terms section (weekly hours, start date, vacation, skills, currency)
 * - Salary period toggle (monthly/yearly) with 13. Monatslohn integration
 * - Bonus group with type selector (absolute/percentage) and conditions
 * - Dynamic insurance rows (add/remove, jurisdiction-based defaults)
 * - Conditional employee-only sections (salary, benefits, insurance, contract)
 * - Surcharges section (weekend/night/holiday) with toggle configs
 * - Overtime config section (employee-only)
 * - Client billing section with improved labels and auto-calc hints
 * - Contract preview panel with contenteditable rich text + client-side preview
 * - File upload area for contract PDFs
 * - Tarifvertrag management cards
 * - Contract status badges (draft, sent, partial, signed)
 * - Responsive down to 320px
 *
 * Theme-aware using CSS variables from themes-v2.css
 * All units in em for responsive scaling
 */

/* ============================================================================
   PAGE BASE
   ============================================================================ */

body[data-page="vendor-employee-management"] {
    overflow-x: hidden;
    min-height: 100vh;
}

body[data-page="vendor-employee-management"] .main-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 3em;
}

/* ============================================================================
   PAGE HEADER
   ============================================================================ */

body[data-page="vendor-employee-management"] .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
    margin-bottom: 1.5em;
}

body[data-page="vendor-employee-management"] .header-actions {
    display: flex;
    gap: 0.5em;
    align-items: center;
    flex-wrap: wrap;
}

body[data-page="vendor-employee-management"] .year-selector {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="vendor-employee-management"] .year-selector button {
    background: var(--glass-secondary);
    border: none;
    padding: 0.5em;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.2s;
}

body[data-page="vendor-employee-management"] .year-selector button:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-employee-management"] .year-display {
    font-weight: 600;
    min-width: 3.75em;
    text-align: center;
    color: var(--text-primary);
}

/* ============================================================================
   VIEW SWITCHER (Pill Buttons)
   ============================================================================ */

body[data-page="vendor-employee-management"] .view-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5em;
    gap: 1em;
}

body[data-page="vendor-employee-management"] .view-switcher {
    display: flex;
    gap: 0.75em;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.5em;
    border-radius: 1.6875em;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
}

body[data-page="vendor-employee-management"] .view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.75em 1.5em;
    border: none;
    background: transparent;
    border-radius: 1.6875em;
    cursor: pointer;
    font-size: 0.875em;
    font-weight: 500;
    line-height: 1;
    color: var(--text-secondary);
    transition: all 0.2s;
    min-width: 6.5em;
    white-space: nowrap;
    text-align: center;
}

body[data-page="vendor-employee-management"] .view-btn svg {
    flex-shrink: 0;
    display: block;
}

body[data-page="vendor-employee-management"] .view-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

body[data-page="vendor-employee-management"] .view-btn.active {
    background: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 0 1.25em rgba(255, 94, 58, 0.4),
        0 0 2.5em rgba(255, 179, 71, 0.2),
        0 0.125em 0.5em rgba(255, 94, 58, 0.3);
}

/* ============================================================================
   FILTER PANEL (Collapsible Grid)
   ============================================================================ */

body[data-page="vendor-employee-management"] .filter-panel {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.5em;
    padding: 1.5em;
    margin-bottom: 1.5em;
    border: 1px solid rgba(255, 255, 255, 0.25);
    grid-template-columns: repeat(auto-fit, minmax(14em, 1fr));
    gap: 1.5em;
    transition: all 0.3s;
}

body[data-page="vendor-employee-management"] .filter-panel.open {
    display: grid;
}

body[data-page="vendor-employee-management"] .filter-section {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

body[data-page="vendor-employee-management"] .filter-label {
    font-weight: 500;
    font-size: 0.875em;
    color: var(--text-primary);
}

body[data-page="vendor-employee-management"] .filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.75em;
    justify-content: flex-end;
    padding-top: 0.75em;
    border-top: 1px solid var(--glass-border);
}

/* Filter inputs */
body[data-page="vendor-employee-management"] .filter-panel input[type="text"],
body[data-page="vendor-employee-management"] .filter-panel input[type="date"],
body[data-page="vendor-employee-management"] .filter-panel input[type="number"],
body[data-page="vendor-employee-management"] .filter-panel select {
    padding: 0.625em 0.75em;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5em;
    font-size: 0.875em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    transition: all 0.2s;
}

body[data-page="vendor-employee-management"] .filter-panel input:focus,
body[data-page="vendor-employee-management"] .filter-panel select:focus {
    outline: none;
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 3px rgba(255, 94, 58, 0.2);
}

body[data-page="vendor-employee-management"] .filter-range {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="vendor-employee-management"] .filter-range span {
    font-size: 0.875em;
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

body[data-page="vendor-employee-management"] .filter-range input {
    flex: 1;
    min-width: 5em;
}

/* Multi-select dropdown */
body[data-page="vendor-employee-management"] .multi-select {
    position: relative;
}

body[data-page="vendor-employee-management"] .multi-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5em;
    padding: 0.625em 0.75em;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5em;
    font-size: 0.875em;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}

body[data-page="vendor-employee-management"] .multi-select-trigger:hover {
    border-color: var(--text-tertiary);
}

body[data-page="vendor-employee-management"] .multi-select-count {
    background: var(--ios-system-orange);
    color: var(--text-primary);
    font-size: 0.7em;
    font-weight: 600;
    padding: 0.15em 0.5em;
    border-radius: 1em;
    min-width: 1.4em;
    text-align: center;
}

body[data-page="vendor-employee-management"] .multi-select-panel {
    display: none;
    position: absolute;
    top: calc(100% + 0.25em);
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--glass-secondary);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    max-height: 15em;
    overflow-y: auto;
    padding: 0.5em;
}

body[data-page="vendor-employee-management"] .multi-select-panel.open {
    display: block;
}

body[data-page="vendor-employee-management"] .multi-select-search {
    width: 100%;
    padding: 0.5em;
    border: 1px solid var(--glass-border);
    border-radius: 0.375em;
    background: var(--glass-primary);
    color: var(--text-primary);
    font-size: 0.8125em;
    margin-bottom: 0.5em;
}

body[data-page="vendor-employee-management"] .multi-select-search::placeholder {
    color: var(--text-tertiary);
}

/* Custom checkboxes (orange gradient) */
body[data-page="vendor-employee-management"] .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.625em;
    cursor: pointer;
    font-size: 0.875em;
    color: var(--text-primary);
    padding: 0.375em 0.5em;
    border-radius: 0.375em;
    transition: background 0.2s;
}

body[data-page="vendor-employee-management"] .checkbox-label:hover {
    background: rgba(255, 255, 255, 0.1);
}

body[data-page="vendor-employee-management"] .checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25em;
    height: 1.25em;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.375em;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

body[data-page="vendor-employee-management"] .checkbox-label input[type="checkbox"]:hover {
    border-color: rgba(255, 94, 58, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

body[data-page="vendor-employee-management"] .checkbox-label input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #ff5e3a 0%, #ff6b47 50%, #ffb347 100%);
    border-color: #ff5e3a;
    box-shadow: 0 0 0 3px rgba(255, 94, 58, 0.2);
}

body[data-page="vendor-employee-management"] .checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 0.3125em;
    height: 0.625em;
    border: solid white;
    border-width: 0 2px 2px 0;
}

body[data-page="vendor-employee-management"] .checkbox-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 94, 58, 0.3);
}

/* ============================================================================
   SUMMARY CARDS
   ============================================================================ */

body[data-page="vendor-employee-management"] .summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12.5em, 1fr));
    gap: 1em;
    margin-bottom: 1.5em;
}

body[data-page="vendor-employee-management"] .summary-card {
    text-align: center;
    padding: 1.25em;
}

body[data-page="vendor-employee-management"] .summary-icon {
    font-size: 1.5em;
    margin-bottom: 0.5em;
    opacity: 0.6;
}

body[data-page="vendor-employee-management"] .summary-value {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

body[data-page="vendor-employee-management"] .summary-value.profit {
    color: var(--ios-system-green);
}

body[data-page="vendor-employee-management"] .summary-value.cost {
    color: var(--ios-system-orange);
}

body[data-page="vendor-employee-management"] .summary-label {
    color: var(--text-secondary);
    margin-top: 0.25em;
}

/* ============================================================================
   EMPLOYEE GRID & CARDS
   ============================================================================ */

body[data-page="vendor-employee-management"] .employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20em, 1fr));
    gap: 1em;
}

body[data-page="vendor-employee-management"] .employee-card {
    display: flex;
    flex-direction: column;
    gap: 1em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 1.25em;
}

body[data-page="vendor-employee-management"] .employee-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

body[data-page="vendor-employee-management"] .employee-header {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

body[data-page="vendor-employee-management"] .employee-avatar {
    width: 3.5em;
    height: 3.5em;
    border-radius: 50%;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-secondary);
    overflow: hidden;
    flex-shrink: 0;
}

body[data-page="vendor-employee-management"] .employee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body[data-page="vendor-employee-management"] .employee-info {
    flex: 1;
    min-width: 0;
}

body[data-page="vendor-employee-management"] .employee-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="vendor-employee-management"] .employee-meta {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-top: 0.25em;
    flex-wrap: wrap;
}

body[data-page="vendor-employee-management"] .employee-type {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.125em 0.5em;
    border-radius: 9999px;
    font-size: 0.75em;
    font-weight: 500;
}

body[data-page="vendor-employee-management"] .employee-type.freelancer {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

body[data-page="vendor-employee-management"] .employee-type.employee {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

body[data-page="vendor-employee-management"] .employee-type.owner {
    background: var(--ios-system-purple);
    color: var(--button-text-on-color);
}

body[data-page="vendor-employee-management"] .employee-type.vollzeit {
    background: var(--ios-system-green);
    color: var(--button-text-on-color);
}

body[data-page="vendor-employee-management"] .employee-type.teilzeit {
    background: var(--ios-system-teal);
    color: var(--button-text-on-color);
}

body[data-page="vendor-employee-management"] .page-header-title {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

body[data-page="vendor-employee-management"] .back-button {
    padding: 0.5em;
    min-width: unset;
}

body[data-page="vendor-employee-management"] .employee-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-size: 0.75em;
    color: var(--text-tertiary);
}

body[data-page="vendor-employee-management"] .status-dot {
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background: var(--ios-system-green);
}

body[data-page="vendor-employee-management"] .status-dot.inactive {
    background: var(--text-quaternary);
}

/* Skill badges */
body[data-page="vendor-employee-management"] .skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375em;
}

body[data-page="vendor-employee-management"] .skill-badge {
    display: inline-block;
    padding: 0.125em 0.5em;
    border-radius: 9999px;
    font-size: 0.6875em;
    font-weight: 500;
    background: var(--glass-primary);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

/* Earnings heatmap */
body[data-page="vendor-employee-management"] .earnings-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0.25em;
}

body[data-page="vendor-employee-management"] .earnings-month {
    aspect-ratio: 1;
    border-radius: 0.25em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65em;
    font-weight: 500;
    color: var(--text-tertiary);
    background: var(--glass-secondary);
    transition: transform 0.15s ease;
}

body[data-page="vendor-employee-management"] .earnings-month:hover {
    transform: scale(1.15);
}

body[data-page="vendor-employee-management"] .earnings-month.has-data {
    background: var(--ios-system-green);
    color: var(--button-text-on-color);
}

body[data-page="vendor-employee-management"] .earnings-month.current {
    outline: 2px solid var(--ios-system-orange);
    outline-offset: 1px;
}

/* Employee stats footer */
body[data-page="vendor-employee-management"] .employee-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5em;
    padding-top: 0.75em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-employee-management"] .employee-stat {
    text-align: center;
}

body[data-page="vendor-employee-management"] .employee-stat-value {
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
}

body[data-page="vendor-employee-management"] .employee-stat-label {
    font-size: 0.6875em;
    color: var(--text-tertiary);
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

body[data-page="vendor-employee-management"] .empty-state {
    text-align: center;
    padding: 3em 1.5em;
}

body[data-page="vendor-employee-management"] .empty-state-icon {
    font-size: 4em;
    opacity: 0.3;
    margin-bottom: 1em;
}

/* ============================================================================
   VIEW PANELS (Dashboard / Calendar / Chat)
   ============================================================================ */

body[data-page="vendor-employee-management"] .view-panel {
    display: none;
}

body[data-page="vendor-employee-management"] .view-panel.active {
    display: block;
    animation: vem-fadeIn 0.3s ease;
}

@keyframes vem-fadeIn {
    from { opacity: 0; transform: translateY(0.5em); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   CALENDAR VIEW
   ============================================================================ */

body[data-page="vendor-employee-management"] .calendar-container {
    min-height: 37.5em;
    background: var(--glass-primary);
    border-radius: var(--radius-lg);
    padding: 1em;
    border: 1px solid var(--glass-border);
}

body[data-page="vendor-employee-management"] .calendar-toolbar {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 1em;
    flex-wrap: wrap;
}

body[data-page="vendor-employee-management"] .calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    align-items: center;
}

body[data-page="vendor-employee-management"] .legend-item {
    display: flex;
    align-items: center;
    gap: 0.375em;
    font-size: 0.8125em;
    color: var(--text-secondary);
}

body[data-page="vendor-employee-management"] .legend-dot {
    width: 0.625em;
    height: 0.625em;
    border-radius: 50%;
    flex-shrink: 0;
}

/* FullCalendar theme overrides */
body[data-page="vendor-employee-management"] .calendar-container .fc {
    height: 100%;
    font-family: var(--font-sans);
}

body[data-page="vendor-employee-management"] .calendar-container .fc-theme-standard {
    --fc-border-color: var(--glass-border);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: var(--glass-primary);
    --fc-list-event-hover-bg-color: var(--glass-hover);
}

body[data-page="vendor-employee-management"] .calendar-container .fc-toolbar-title {
    color: var(--text-primary);
    font-size: 1.25em;
}

body[data-page="vendor-employee-management"] .calendar-container .fc-button {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5em 1em;
    border-radius: var(--radius-sm);
}

body[data-page="vendor-employee-management"] .calendar-container .fc-button:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border);
}

body[data-page="vendor-employee-management"] .calendar-container .fc-button:focus {
    box-shadow: none;
}

body[data-page="vendor-employee-management"] .calendar-container .fc-button-active {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

body[data-page="vendor-employee-management"] .calendar-container .fc-button-active:hover {
    background: var(--ios-system-orange);
    opacity: 0.9;
}

body[data-page="vendor-employee-management"] .calendar-container .fc-col-header-cell {
    background: var(--glass-primary);
}

body[data-page="vendor-employee-management"] .calendar-container .fc-col-header-cell-cushion {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.75em 0;
}

body[data-page="vendor-employee-management"] .calendar-container .fc-daygrid-day {
    background: transparent;
}

body[data-page="vendor-employee-management"] .calendar-container .fc-daygrid-day:hover {
    background: var(--glass-primary);
}

body[data-page="vendor-employee-management"] .calendar-container .fc-daygrid-day-number {
    color: var(--text-primary);
    padding: 0.5em;
}

body[data-page="vendor-employee-management"] .calendar-container .fc-day-today {
    background: rgba(255, 149, 0, 0.1);
}

body[data-page="vendor-employee-management"] .calendar-container .fc-day-today .fc-daygrid-day-number {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border-radius: 50%;
    width: 1.75em;
    height: 1.75em;
    display: flex;
    align-items: center;
    justify-content: center;
}

body[data-page="vendor-employee-management"] .calendar-container .fc-event {
    border-radius: var(--radius-sm);
    border: none;
    padding: 0.125em 0.25em;
    font-size: 0.85em;
    cursor: pointer;
}

body[data-page="vendor-employee-management"] .calendar-container .fc-event:hover {
    opacity: 0.9;
}

body[data-page="vendor-employee-management"] .calendar-container .fc-event-title {
    font-weight: 500;
}

body[data-page="vendor-employee-management"] .calendar-container .fc-timegrid-slot {
    height: 3em;
}

body[data-page="vendor-employee-management"] .calendar-container .fc-timegrid-slot-label {
    color: var(--text-tertiary);
    font-size: 0.75em;
}

body[data-page="vendor-employee-management"] .calendar-container .fc-list-event {
    background: var(--glass-primary);
}

body[data-page="vendor-employee-management"] .calendar-container .fc-list-event:hover td {
    background: var(--glass-hover);
}

body[data-page="vendor-employee-management"] .calendar-container .fc-list-day-cushion {
    background: var(--glass-secondary);
    color: var(--text-primary);
}

body[data-page="vendor-employee-management"] .calendar-container .fc-list-event-time,
body[data-page="vendor-employee-management"] .calendar-container .fc-list-event-title {
    color: var(--text-primary);
}

/* ============================================================================
   MODAL SCROLL
   ============================================================================ */

body[data-page="vendor-employee-management"] .modal-overlay {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2em 0;
}

body[data-page="vendor-employee-management"] .modal-overlay > .glass-card {
    max-height: none;
    margin: auto;
}

/* ============================================================================
   MODAL FORM STYLES
   ============================================================================ */

body[data-page="vendor-employee-management"] .modal-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="vendor-employee-management"] .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1em;
}

body[data-page="vendor-employee-management"] .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

body[data-page="vendor-employee-management"] .form-group.full-width {
    grid-column: 1 / -1;
}

body[data-page="vendor-employee-management"] .form-label {
    font-size: 0.875em;
    color: var(--text-secondary);
}

body[data-page="vendor-employee-management"] .form-input,
body[data-page="vendor-employee-management"] .form-select {
    padding: 0.5em 0.75em;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-secondary);
    color: var(--text-primary);
    font-size: 1em;
    font-family: var(--font-sans);
}

body[data-page="vendor-employee-management"] .form-input:focus,
body[data-page="vendor-employee-management"] .form-select:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

/* Override browser autofill white background */
body[data-page="vendor-employee-management"] .form-input:-webkit-autofill,
body[data-page="vendor-employee-management"] .form-input:-webkit-autofill:hover,
body[data-page="vendor-employee-management"] .form-input:-webkit-autofill:focus,
body[data-page="vendor-employee-management"] .form-input:-webkit-autofill:active,
body[data-page="vendor-employee-management"] .form-select:-webkit-autofill,
body[data-page="vendor-employee-management"] .form-select:-webkit-autofill:hover,
body[data-page="vendor-employee-management"] .form-select:-webkit-autofill:focus,
body[data-page="vendor-employee-management"] .form-select:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-primary) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--input-bg-solid, var(--glass-secondary)) inset !important;
    box-shadow: 0 0 0 1000px var(--input-bg-solid, var(--glass-secondary)) inset !important;
    background-color: var(--input-bg-solid, var(--glass-secondary)) !important;

    transition: background-color 5000s ease-in-out 0s;
    caret-color: var(--text-primary) !important;
}

/* ============================================================================
   EMPLOYEE-ONLY SECTIONS (Conditional: hidden for freelancers)
   ============================================================================ */

body[data-page="vendor-employee-management"] .employee-section {
    display: none;
    flex-direction: column;
    gap: 1em;
    padding-top: 1em;
    border-top: 1px solid var(--glass-border);
    animation: vem-fadeIn 0.3s ease;
}

body[data-page="vendor-employee-management"] .employee-section.visible {
    display: flex;
}

body[data-page="vendor-employee-management"] .section-header {
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0.25em;
}

/* Insurance grid (2-column percentage inputs) */
body[data-page="vendor-employee-management"] .insurance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75em;
}

/* Benefit checkbox row (inline checkbox + optional amount) */
body[data-page="vendor-employee-management"] .benefit-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

body[data-page="vendor-employee-management"] .benefit-checkbox-row label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    cursor: pointer;
    font-size: 0.875em;
    color: var(--text-primary);
    white-space: nowrap;
}

body[data-page="vendor-employee-management"] .benefit-checkbox-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25em;
    height: 1.25em;
    border: 2px solid var(--glass-border);
    border-radius: 0.375em;
    background: var(--glass-secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

body[data-page="vendor-employee-management"] .benefit-checkbox-row input[type="checkbox"]:checked {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-employee-management"] .benefit-checkbox-row input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 0.3125em;
    height: 0.625em;
    border: solid white;
    border-width: 0 2px 2px 0;
}

/* ============================================================================
   EMPLOYMENT TERMS SECTION
   ============================================================================ */

body[data-page="vendor-employee-management"] .employment-terms-section {
    padding-top: 1em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-employee-management"] .employment-terms-section .section-header {
    margin-bottom: 0;
    padding-bottom: 0.25em;
    border-bottom: none;
}

/* ============================================================================
   CLIENT BILLING SECTION (at bottom of modal)
   ============================================================================ */

body[data-page="vendor-employee-management"] .client-billing-section {
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding-top: 1em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-employee-management"] .client-billing-section .section-header {
    margin-bottom: 0;
    padding-bottom: 0.25em;
    border-bottom: none;
}

body[data-page="vendor-employee-management"] .client-billing-section .ios-caption2 {
    margin-bottom: 0.5em;
}

/* Section subheader (smaller than section-header) */
body[data-page="vendor-employee-management"] .section-subheader {
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 0.25em;
}

/* Rate tiers container */
body[data-page="vendor-employee-management"] .rate-tiers-container {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

body[data-page="vendor-employee-management"] .rate-tiers-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

body[data-page="vendor-employee-management"] .rate-tier-row {
    display: flex;
    gap: 0.5em;
    align-items: center;
}

body[data-page="vendor-employee-management"] .rate-tier-row .form-input:first-child {
    flex: 2;
}

body[data-page="vendor-employee-management"] .rate-tier-row .form-input:nth-child(2) {
    flex: 1;
}

body[data-page="vendor-employee-management"] .rate-tier-remove-btn {
    flex-shrink: 0;
    padding: 0.375em;
    min-width: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

body[data-page="vendor-employee-management"] .rate-tier-remove-btn:hover {
    color: var(--ios-system-red);
}

body[data-page="vendor-employee-management"] .rate-tier-add-btn {
    width: 100%;
    justify-content: center;
    border: 2px dashed var(--glass-border);
    background: transparent;
}

/* ============================================================================
   SURCHARGES SECTION (Weekend / Night / Holiday)
   ============================================================================ */

body[data-page="vendor-employee-management"] .surcharges-section {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    padding-top: 1em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-employee-management"] .surcharge-row {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.75em 1em;
}

body[data-page="vendor-employee-management"] .surcharge-toggle {
    display: flex;
    align-items: center;
    gap: 0.5em;
    cursor: pointer;
    font-size: 0.875em;
    color: var(--text-primary);
}

body[data-page="vendor-employee-management"] .surcharge-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25em;
    height: 1.25em;
    border: 2px solid var(--glass-border);
    border-radius: 0.375em;
    background: var(--glass-secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

body[data-page="vendor-employee-management"] .surcharge-toggle input[type="checkbox"]:checked {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-employee-management"] .surcharge-toggle input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 0.3125em;
    height: 0.625em;
    border: solid white;
    border-width: 0 2px 2px 0;
}

body[data-page="vendor-employee-management"] .surcharge-config {
    display: none;
    grid-template-columns: 1fr 5em 1fr;
    gap: 0.5em;
    margin-top: 0.75em;
    padding-top: 0.75em;
    border-top: 1px solid var(--glass-border);
    align-items: center;
}

body[data-page="vendor-employee-management"] .surcharge-config.visible {
    display: grid;
}

body[data-page="vendor-employee-management"] .surcharge-value-input {
    width: 5em;
}

body[data-page="vendor-employee-management"] .surcharge-time-range {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-top: 0.25em;
}

body[data-page="vendor-employee-management"] .surcharge-time-range input[type="time"] {
    width: 8em;
}

/* ============================================================================
   OVERTIME SECTION (Employee-only)
   ============================================================================ */

body[data-page="vendor-employee-management"] .overtime-surcharge-row {
    display: flex;
    gap: 0.5em;
    align-items: center;
}

body[data-page="vendor-employee-management"] .overtime-surcharge-row .form-select {
    flex: 1;
}

body[data-page="vendor-employee-management"] .overtime-surcharge-row .surcharge-value-input {
    width: 5em;
    flex-shrink: 0;
}

/* Contract section extras */
body[data-page="vendor-employee-management"] .contract-mode-toggle {
    display: flex;
    gap: 0.5em;
    margin-bottom: 0.75em;
}

body[data-page="vendor-employee-management"] .contract-mode-toggle label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 1em;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    cursor: pointer;
    font-size: 0.875em;
    color: var(--text-secondary);
    transition: all 0.2s;
}

body[data-page="vendor-employee-management"] .contract-mode-toggle label:has(input:checked) {
    background: var(--glass-hover);
    border-color: var(--ios-system-orange);
    color: var(--text-primary);
}

body[data-page="vendor-employee-management"] .contract-mode-toggle input[type="radio"] {
    display: none;
}

/* File upload area */
body[data-page="vendor-employee-management"] .file-upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-md);
    padding: 2em 1.5em;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--glass-primary);
}

body[data-page="vendor-employee-management"] .file-upload-area:hover {
    border-color: var(--ios-system-orange);
    background: var(--glass-hover);
}

body[data-page="vendor-employee-management"] .file-upload-area .upload-icon {
    font-size: 2em;
    opacity: 0.4;
    margin-bottom: 0.5em;
}

body[data-page="vendor-employee-management"] .file-upload-area .upload-hint {
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

/* Contract preview panel */
body[data-page="vendor-employee-management"] .contract-preview-panel {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1em;
    background: var(--glass-primary);
    max-height: 20em;
    overflow-y: auto;
    font-size: 0.875em;
    line-height: 1.6;
    color: var(--text-primary);
}

body[data-page="vendor-employee-management"] .contract-preview-panel[contenteditable="true"] {
    cursor: text;
    outline: none;
}

body[data-page="vendor-employee-management"] .contract-preview-panel[contenteditable="true"]:focus {
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.2);
}

/* Contract actions row */
body[data-page="vendor-employee-management"] .contract-actions {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

/* Contract status badge */
body[data-page="vendor-employee-management"] .contract-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.25em 0.75em;
    border-radius: 9999px;
    font-size: 0.75em;
    font-weight: 500;
}

body[data-page="vendor-employee-management"] .contract-status.draft {
    background: var(--glass-secondary);
    color: var(--text-secondary);
}

body[data-page="vendor-employee-management"] .contract-status.sent {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="vendor-employee-management"] .contract-status.partial {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="vendor-employee-management"] .contract-status.signed {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

/* File preview (uploaded contract) */
body[data-page="vendor-employee-management"] .file-preview {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em;
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

body[data-page="vendor-employee-management"] .file-preview .file-name {
    flex: 1;
    font-size: 0.875em;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-page="vendor-employee-management"] .file-preview .file-remove {
    background: none;
    border: none;
    color: var(--ios-system-red);
    cursor: pointer;
    padding: 0.25em;
    font-size: 0.875em;
}

/* Contract attachments */
body[data-page="vendor-employee-management"] .contract-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin-bottom: 0.75em;
}

body[data-page="vendor-employee-management"] .contract-attachment-row {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
}

body[data-page="vendor-employee-management"] .contract-attachment-row .attachment-name {
    flex: 1;
    font-size: 0.875em;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-page="vendor-employee-management"] .contract-attachment-row .attachment-date {
    font-size: 0.75em;
    color: var(--text-tertiary);
}

body[data-page="vendor-employee-management"] .contract-attachment-upload {
    padding: 1em;
    border-style: dashed;
}

body[data-page="vendor-employee-management"] .contract-attachment-upload .upload-icon {
    font-size: 1.25em;
    margin-bottom: 0.25em;
}

/* Tarifvertrag panel */
body[data-page="vendor-employee-management"] .tarifvertrag-card {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
}

body[data-page="vendor-employee-management"] .tarifvertrag-card:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-employee-management"] .tarifvertrag-card .tv-info {
    flex: 1;
    min-width: 0;
}

body[data-page="vendor-employee-management"] .tarifvertrag-card .tv-name {
    font-weight: 600;
    font-size: 0.875em;
    color: var(--text-primary);
}

body[data-page="vendor-employee-management"] .tarifvertrag-card .tv-meta {
    font-size: 0.75em;
    color: var(--text-tertiary);
}

/* ============================================================================
   DETAILS MODAL TABLE
   ============================================================================ */

body[data-page="vendor-employee-management"] .details-table {
    width: 100%;
    border-collapse: collapse;
}

body[data-page="vendor-employee-management"] .details-table th {
    text-align: left;
    padding: 0.5em 0.75em;
    font-size: 0.8125em;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-employee-management"] .details-table th.text-right {
    text-align: right;
}

body[data-page="vendor-employee-management"] .details-table td {
    padding: 0.5em 0.75em;
    font-size: 0.9375em;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-employee-management"] .details-table td.text-right {
    text-align: right;
}

body[data-page="vendor-employee-management"] .text-green {
    color: var(--ios-system-green);
}

body[data-page="vendor-employee-management"] .text-red {
    color: var(--ios-system-red);
}

/* ============================================================================
   DETAILS MODAL — viewport-constrained with internal scroll
   ============================================================================ */

body[data-page="vendor-employee-management"] #detailsModal > .glass-card {
    max-height: calc(100vh - 4em);
    display: flex;
    flex-direction: column;
    padding: 1.25em 1.5em;
}

body[data-page="vendor-employee-management"] #detailsModal .details-modal-header {
    flex-shrink: 0;
    margin-bottom: 0.75em;
}

body[data-page="vendor-employee-management"] #detailsContent {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

/* Info grid — compact 3-column layout */
body[data-page="vendor-employee-management"] .details-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5em;
    margin-bottom: 1em;
}

body[data-page="vendor-employee-management"] .details-info-box {
    padding: 0.5em 0.75em;
}

/* Summary strip — compact 4-across */
body[data-page="vendor-employee-management"] #detailsContent .summary-cards {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5em;
    margin-bottom: 1em;
}

body[data-page="vendor-employee-management"] #detailsContent .summary-card {
    padding: 0.5em;
}

body[data-page="vendor-employee-management"] #detailsContent .summary-value {
    font-size: 1.125em;
}

/* Compact table rows */
body[data-page="vendor-employee-management"] #detailsContent .details-table th,
body[data-page="vendor-employee-management"] #detailsContent .details-table td {
    padding: 0.25em 0.5em;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 64em) {
    body[data-page="vendor-employee-management"] .employee-grid {
        grid-template-columns: repeat(auto-fill, minmax(17em, 1fr));
    }

}

@media (max-width: 48em) {
    body[data-page="vendor-employee-management"] .details-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-page="vendor-employee-management"] #detailsContent .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-page="vendor-employee-management"] .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    body[data-page="vendor-employee-management"] .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    body[data-page="vendor-employee-management"] .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-page="vendor-employee-management"] .employee-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-employee-management"] .form-row {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-employee-management"] .insurance-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-employee-management"] .contract-mode-toggle {
        flex-direction: column;
    }

    body[data-page="vendor-employee-management"] .contract-actions {
        flex-direction: column;
    }

    body[data-page="vendor-employee-management"] .contract-actions .glass-button {
        width: 100%;
        justify-content: center;
    }

    body[data-page="vendor-employee-management"] .surcharge-config {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-employee-management"] .surcharge-value-input {
        width: 100%;
    }

    body[data-page="vendor-employee-management"] .overtime-surcharge-row {
        flex-direction: column;
        align-items: stretch;
    }

    body[data-page="vendor-employee-management"] .overtime-surcharge-row .surcharge-value-input {
        width: 100%;
    }

    body[data-page="vendor-employee-management"] .rate-tier-row {
        flex-direction: column;
    }

    body[data-page="vendor-employee-management"] .view-switcher {
        gap: 0.25em;
        padding: 0.25em;
    }

    body[data-page="vendor-employee-management"] .view-btn {
        padding: 0.5em 0.75em;
        font-size: 0.8125em;
        min-width: auto;
    }

    /* Calendar responsive */
    body[data-page="vendor-employee-management"] .calendar-container .fc-toolbar {
        flex-direction: column;
        gap: 0.5em;
    }

    body[data-page="vendor-employee-management"] .calendar-container .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
}

/* ============================================================================
   SALARY PERIOD TOGGLE (monatlich / jährlich pill toggle)
   ============================================================================ */

body[data-page="vendor-employee-management"] .salary-period-toggle {
    display: flex;
    gap: 0.5em;
    margin-bottom: 0.75em;
}

body[data-page="vendor-employee-management"] .salary-period-toggle label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 1em;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    cursor: pointer;
    font-size: 0.875em;
    color: var(--text-secondary);
    transition: all 0.2s;
}

body[data-page="vendor-employee-management"] .salary-period-toggle label:has(input:checked) {
    background: var(--glass-hover);
    border-color: var(--ios-system-orange);
    color: var(--text-primary);
}

body[data-page="vendor-employee-management"] .salary-period-toggle input[type="radio"] {
    display: none;
}

/* ============================================================================
   INSURANCE DYNAMIC ROWS
   ============================================================================ */

body[data-page="vendor-employee-management"] .insurance-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

body[data-page="vendor-employee-management"] .insurance-row {
    display: flex;
    gap: 0.5em;
    align-items: center;
}

body[data-page="vendor-employee-management"] .insurance-row .form-input:first-child {
    flex: 2;
}

body[data-page="vendor-employee-management"] .insurance-row .form-input:nth-child(2) {
    flex: 1;
    max-width: 6em;
}

body[data-page="vendor-employee-management"] .insurance-row .form-select {
    flex: 0 0 5em;
}

body[data-page="vendor-employee-management"] .insurance-add-btn {
    width: 100%;
    justify-content: center;
    border: 2px dashed var(--glass-border);
    background: transparent;
    margin-top: 0.5em;
}

/* ============================================================================
   BONUS GROUP
   ============================================================================ */

body[data-page="vendor-employee-management"] .bonus-group {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

/* ============================================================================
   AUTO-CALC HINT
   ============================================================================ */

body[data-page="vendor-employee-management"] .auto-calc-hint {
    font-size: 0.75em;
    color: var(--ios-system-orange);
    font-weight: 500;
    margin-top: 0.25em;
}

/* ============================================================================
   RESPONSIVE ADDITIONS FOR NEW COMPONENTS
   ============================================================================ */

@media (max-width: 48em) {
    body[data-page="vendor-employee-management"] .salary-period-toggle {
        flex-direction: column;
    }

    body[data-page="vendor-employee-management"] .insurance-row {
        flex-wrap: wrap;
    }

    body[data-page="vendor-employee-management"] .insurance-row .form-input:first-child {
        flex: 1 1 100%;
    }

    body[data-page="vendor-employee-management"] .insurance-row .form-input:nth-child(2) {
        flex: 1;
        max-width: none;
    }

    body[data-page="vendor-employee-management"] .insurance-row .form-select {
        flex: 1;
    }
}

/* ============================================================================
   PERMISSIONS SECTION (Toggle Switches)
   ============================================================================ */

body[data-page="vendor-employee-management"] .pk-permissions-section {
    margin-top: 1.5em;
    padding-top: 1.25em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-employee-management"] .pk-permissions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

body[data-page="vendor-employee-management"] .pk-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.5em 0;
}

body[data-page="vendor-employee-management"] .pk-toggle-label {
    font-size: 0.875em;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

/* iOS-style toggle switch */
body[data-page="vendor-employee-management"] .pk-toggle {
    position: relative;
    width: 3.125em;
    height: 1.875em;
    flex-shrink: 0;
}

body[data-page="vendor-employee-management"] .pk-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

body[data-page="vendor-employee-management"] .pk-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 1em;
    transition: all 0.3s;
}

body[data-page="vendor-employee-management"] .pk-toggle-slider::before {
    content: '';
    position: absolute;
    height: 1.375em;
    width: 1.375em;
    left: 0.1875em;
    bottom: 0.1875em;
    background: var(--text-primary);
    border-radius: 50%;
    transition: all 0.3s;
    opacity: 0.6;
}

body[data-page="vendor-employee-management"] .pk-toggle input:checked + .pk-toggle-slider {
    background: var(--ios-system-green);
    border-color: var(--ios-system-green);
}

body[data-page="vendor-employee-management"] .pk-toggle input:checked + .pk-toggle-slider::before {
    transform: translateX(1.25em);
    background: white;
    opacity: 1;
}

/**
 * @file vendor-time-tracking.css
 * @filepath public/css/pages/vendor-time-tracking.css
 * @description Styles for vendor time tracking / clock-in page
 * @created 2026-02-06
 * @modified 2026-02-10 - Improved Schichtplan visual width, nav layout, shift cards,
 *   added template section + modal styles (Langzeit-Schichtplan)
 *
 * <file_documentation>
 *   <purpose>
 *     Polished UI for the vendor time-tracking page including the hero
 *     clock widget with ring accent, stat summary cards with color
 *     indicators, timeline-style time-entry list, clock-out modal,
 *     activity selector with optgroups, inline category creation dialog,
 *     employee chip multi-select for manual entry, employee selector
 *     for edit modal, and Langzeit-Schichtplan template system.
 *   </purpose>
 *   <theme_support>All 5 themes via CSS variables</theme_support>
 *   <scoping>body[data-page="vendor-time-tracking"]</scoping>
 * </file_documentation>
 */

/* ============================================================================
   SCROLL FIX (matches vendor-dashboard pattern)
   ============================================================================ */

body[data-page="vendor-time-tracking"] {
    overflow-x: hidden;
    overflow-y: scroll;
    height: auto;
    min-height: 100vh;
    overscroll-behavior: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
}

body[data-page="vendor-time-tracking"] .app-container {
    min-height: 100vh;
    height: auto;
    overflow-y: visible;
    overscroll-behavior: auto;
}

/* ============================================================================
   PAGE LAYOUT
   ============================================================================ */

body[data-page="vendor-time-tracking"] .time-tracking-container {
    max-width: 56.25em;
    margin: 0 auto;
    padding: 2em 1em 4em;
}

/* ============================================================================
   PAGE HEADER
   ============================================================================ */

body[data-page="vendor-time-tracking"] .tt-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2em;
    gap: 1em;
    flex-wrap: wrap;
}

body[data-page="vendor-time-tracking"] .tt-page-header h1 {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

body[data-page="vendor-time-tracking"] .tt-page-header .tt-subtitle {
    color: var(--text-secondary);
    margin-top: 0.25em;
}

/* ============================================================================
   CLOCK WIDGET - Hero Card
   ============================================================================ */

body[data-page="vendor-time-tracking"] .clock-widget {
    position: relative;
    text-align: center;
    padding: 2.5em 2em 2em;
    margin-bottom: 1.5em;
    overflow: hidden;
}

/* Subtle gradient accent at top of card */
body[data-page="vendor-time-tracking"] .clock-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.25em;
    background: linear-gradient(90deg,
        var(--ios-system-orange) 0%,
        var(--ios-system-green) 50%,
        var(--ios-system-orange) 100%);
    border-radius: 0.25em 0.25em 0 0;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

body[data-page="vendor-time-tracking"] .clock-widget.clocked-in::before {
    opacity: 1;
    background: linear-gradient(90deg,
        var(--ios-system-green) 0%,
        var(--ios-system-orange) 50%,
        var(--ios-system-green) 100%);
    animation: tt-accent-pulse 3s ease-in-out infinite;
}

@keyframes tt-accent-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Clock time display */
body[data-page="vendor-time-tracking"] .clock-display {
    font-size: 4.5em;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: 0.2em;
}

/* Status indicator with dot */
body[data-page="vendor-time-tracking"] .clock-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-size: 1em;
    color: var(--text-tertiary);
    margin-bottom: 1.5em;
    padding: 0.375em 1em;
    border-radius: 9999px;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

body[data-page="vendor-time-tracking"] .clock-status::before {
    content: '';
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background: var(--text-quaternary);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

body[data-page="vendor-time-tracking"] .clock-status.active {
    color: var(--ios-system-green);
    border-color: rgba(52, 199, 89, 0.3);
    background: rgba(52, 199, 89, 0.08);
}

body[data-page="vendor-time-tracking"] .clock-status.active::before {
    background: var(--ios-system-green);
    box-shadow: 0 0 0.5em rgba(52, 199, 89, 0.5);
}

/* Elapsed timer */
body[data-page="vendor-time-tracking"] .clock-elapsed {
    font-size: 2.25em;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ios-system-orange);
    margin-bottom: 1em;
    letter-spacing: 0.03em;
}

/* Activity selector (jobs + categories) */
body[data-page="vendor-time-tracking"] .activity-selector {
    margin-bottom: 1.5em;
    display: flex;
    justify-content: center;
}

body[data-page="vendor-time-tracking"] .activity-select {
    width: 100%;
    max-width: 22em;
    padding: 0.625em 1em;
    border-radius: 0.75em;
    border: 1px solid var(--glass-border);
    background: var(--glass-secondary);
    color: var(--text-primary);
    font-size: 0.9375em;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8.825a.5.5 0 01-.354-.146l-4-4a.5.5 0 11.708-.708L6 7.617l3.646-3.646a.5.5 0 01.708.708l-4 4A.5.5 0 016 8.825z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75em center;
    padding-right: 2.5em;
    transition: border-color 0.2s ease;
}

body[data-page="vendor-time-tracking"] .activity-select:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .activity-select optgroup {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Inline add-category dialog */
body[data-page="vendor-time-tracking"] .tt-add-category-dialog {
    display: flex;
    justify-content: center;
    margin-bottom: 1em;
}

body[data-page="vendor-time-tracking"] .tt-add-category-row {
    display: flex;
    align-items: center;
    gap: 0.5em;
    max-width: 22em;
    width: 100%;
}

body[data-page="vendor-time-tracking"] .tt-add-category-row .tt-form-input {
    flex: 1;
}

body[data-page="vendor-time-tracking"] .tt-cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25em;
    height: 2.25em;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

body[data-page="vendor-time-tracking"] .tt-cat-btn:hover {
    color: var(--text-primary);
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .tt-cat-save:hover {
    background: rgba(52, 199, 89, 0.12);
    border-color: var(--ios-system-green);
    color: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .tt-cat-cancel:hover {
    background: rgba(255, 59, 48, 0.12);
    border-color: var(--ios-system-red);
    color: var(--ios-system-red);
}

/* Clock buttons */
body[data-page="vendor-time-tracking"] .clock-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75em;
}

body[data-page="vendor-time-tracking"] .clock-btn {
    padding: 0.75em 2.5em;
    font-size: 1.0625em;
    font-weight: 600;
    border-radius: 0.875em;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    letter-spacing: 0.01em;
}

body[data-page="vendor-time-tracking"] .clock-btn.clock-in {
    background: var(--ios-system-green);
    color: var(--button-text-on-color);
    box-shadow: 0 0.25em 1em rgba(52, 199, 89, 0.3);
}

body[data-page="vendor-time-tracking"] .clock-btn.clock-in:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.375em 1.5em rgba(52, 199, 89, 0.4);
}

body[data-page="vendor-time-tracking"] .clock-btn.clock-out {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
    box-shadow: 0 0.25em 1em rgba(255, 59, 48, 0.3);
}

body[data-page="vendor-time-tracking"] .clock-btn.clock-out:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.375em 1.5em rgba(255, 59, 48, 0.4);
}

body[data-page="vendor-time-tracking"] .clock-btn:active {
    transform: translateY(0);
}

body[data-page="vendor-time-tracking"] .clock-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================================================
   STATISTICS CARDS
   ============================================================================ */

body[data-page="vendor-time-tracking"] .stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75em;
    margin-bottom: 2em;
}

body[data-page="vendor-time-tracking"] .stat-card {
    position: relative;
    padding: 1.25em 1em;
    text-align: left;
    overflow: hidden;
    transition: transform 0.2s ease;
}

/* Color accent strip on left */
body[data-page="vendor-time-tracking"] .stat-card::before {
    content: '';
    position: absolute;
    top: 0.75em;
    bottom: 0.75em;
    left: 0;
    width: 0.1875em;
    border-radius: 0 0.125em 0.125em 0;
}

body[data-page="vendor-time-tracking"] .stat-card:nth-child(1)::before {
    background: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .stat-card:nth-child(2)::before {
    background: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .stat-card:nth-child(3)::before {
    background: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .stat-card:nth-child(4)::before {
    background: var(--ios-system-purple, #AF52DE);
}

body[data-page="vendor-time-tracking"] .stat-value {
    font-size: 1.75em;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    line-height: 1.2;
    padding-left: 0.5em;
}

body[data-page="vendor-time-tracking"] .stat-label {
    font-size: 0.8125em;
    color: var(--text-tertiary);
    margin-top: 0.25em;
    padding-left: 0.875em;
}

/* ============================================================================
   ENTRIES SECTION
   ============================================================================ */

body[data-page="vendor-time-tracking"] .entries-section {
    margin-top: 0;
}

body[data-page="vendor-time-tracking"] .entries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
    flex-wrap: wrap;
    gap: 0.75em;
}

body[data-page="vendor-time-tracking"] .entries-header h2 {
    font-size: 1.375em;
    font-weight: 600;
}

/* Filter pills */
body[data-page="vendor-time-tracking"] .entries-filters {
    display: flex;
    gap: 0.25em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.625em;
    padding: 0.1875em;
}

body[data-page="vendor-time-tracking"] .filter-btn {
    padding: 0.375em 0.875em;
    border-radius: 0.5em;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8125em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

body[data-page="vendor-time-tracking"] .filter-btn:hover {
    color: var(--text-primary);
}

body[data-page="vendor-time-tracking"] .filter-btn.active {
    background: var(--glass-secondary);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   ENTRY CARDS - Timeline Style
   ============================================================================ */

body[data-page="vendor-time-tracking"] .entry-card {
    display: grid;
    grid-template-columns: 3.5em 1fr auto;
    gap: 1em;
    align-items: center;
    padding: 1em 1.25em;
    margin-bottom: 0.5em;
    border-radius: 0.75em;
    transition: background 0.15s ease;
}

body[data-page="vendor-time-tracking"] .entry-card:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-time-tracking"] .entry-card-editable {
    cursor: pointer;
}

body[data-page="vendor-time-tracking"] .entry-card-editable:hover {
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 1px var(--ios-system-orange);
}

/* Date column */
body[data-page="vendor-time-tracking"] .entry-date {
    text-align: center;
    min-width: 3.5em;
}

body[data-page="vendor-time-tracking"] .entry-day {
    font-size: 1.375em;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

body[data-page="vendor-time-tracking"] .entry-month {
    font-size: 0.6875em;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Details column */
body[data-page="vendor-time-tracking"] .entry-details {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    min-width: 0;
}

body[data-page="vendor-time-tracking"] .entry-job {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="vendor-time-tracking"] .entry-times {
    font-size: 0.8125em;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* Status badges */
body[data-page="vendor-time-tracking"] .entry-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.125em 0.5em;
    border-radius: 9999px;
    font-size: 0.6875em;
    font-weight: 600;
    letter-spacing: 0.02em;
    width: fit-content;
}

body[data-page="vendor-time-tracking"] .entry-status.locked {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .entry-status.active {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .entry-status.edit_requested {
    background: rgba(255, 204, 0, 0.15);
    color: var(--ios-system-yellow, #FFCC00);
}

body[data-page="vendor-time-tracking"] .entry-status.approved {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .entry-status.rejected {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

/* Duration column */
body[data-page="vendor-time-tracking"] .entry-duration {
    font-size: 1.125em;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    text-align: right;
    white-space: nowrap;
}

body[data-page="vendor-time-tracking"] .entry-duration.active {
    color: var(--ios-system-green);
}

/* Empty state */
body[data-page="vendor-time-tracking"] .tt-empty-state {
    padding: 4em 1.5em;
    min-height: 12em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body[data-page="vendor-time-tracking"] .tt-empty-icon {
    font-size: 4em;
    opacity: 0.2;
    margin-bottom: 0.5em;
    display: block;
}

/* ============================================================================
   MANUAL ENTRY MODAL
   ============================================================================ */

body[data-page="vendor-time-tracking"] .tt-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="vendor-time-tracking"] .tt-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75em;
}

body[data-page="vendor-time-tracking"] .tt-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

body[data-page="vendor-time-tracking"] .tt-form-group.full-width {
    grid-column: 1 / -1;
}

body[data-page="vendor-time-tracking"] .tt-form-label {
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-secondary);
}

body[data-page="vendor-time-tracking"] .tt-form-input {
    padding: 0.5em 0.75em;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    background: var(--glass-secondary);
    color: var(--text-primary);
    font-size: 0.9375em;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

body[data-page="vendor-time-tracking"] .tt-form-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .tt-form-input::placeholder {
    color: var(--text-tertiary);
}

/* Add-entry button in entries header */
body[data-page="vendor-time-tracking"] .tt-add-entry-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.75em;
    font-size: 0.8125em;
    font-weight: 500;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

body[data-page="vendor-time-tracking"] .tt-add-entry-btn:hover {
    color: var(--text-primary);
    border-color: var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.08);
}

@media (max-width: 30em) {
    body[data-page="vendor-time-tracking"] .tt-form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   EMPLOYEE CHIPS (Multi-select in manual entry modal)
   ============================================================================ */

body[data-page="vendor-time-tracking"] .tt-employee-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}

body[data-page="vendor-time-tracking"] .tt-employee-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.875em;
    border-radius: 9999px;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-secondary);
    font-size: 0.8125em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

body[data-page="vendor-time-tracking"] .tt-employee-chip:hover {
    background: var(--glass-hover);
    border-color: var(--ios-system-orange);
    color: var(--text-primary);
}

body[data-page="vendor-time-tracking"] .tt-employee-chip.selected {
    background: rgba(255, 149, 0, 0.12);
    border-color: var(--ios-system-orange);
    color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .tt-chip-hint {
    font-size: 0.75em;
    color: var(--text-tertiary);
    margin-top: 0.25em;
}

/* ============================================================================
   CLOCK-OUT MODAL
   ============================================================================ */

body[data-page="vendor-time-tracking"] .break-input {
    display: flex;
    align-items: center;
    gap: 1em;
    justify-content: center;
    margin: 1.5em 0;
}

body[data-page="vendor-time-tracking"] .break-input input {
    width: 5em;
    text-align: center;
    font-size: 1.5em;
    font-variant-numeric: tabular-nums;
    padding: 0.375em;
    border-radius: 0.625em;
    border: 1px solid var(--glass-border);
    background: var(--glass-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

body[data-page="vendor-time-tracking"] .break-input input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .notes-textarea {
    width: 100%;
    min-height: 5em;
    padding: 0.75em;
    border-radius: 0.625em;
    border: 1px solid var(--glass-border);
    background: var(--glass-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375em;
    resize: vertical;
    transition: border-color 0.2s ease;
}

body[data-page="vendor-time-tracking"] .notes-textarea:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .notes-textarea::placeholder {
    color: var(--text-tertiary);
}

/* ============================================================================
   VIEW SWITCHER (Tabs: Zeiterfassung / Schichtplan / Urlaub / Arbeitszeit)
   ============================================================================ */

body[data-page="vendor-time-tracking"] .tt-view-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5em;
}

body[data-page="vendor-time-tracking"] .tt-view-switcher {
    display: flex;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 0.25em;
    gap: 0.125em;
    overflow-x: auto;
}

body[data-page="vendor-time-tracking"] .tt-view-btn {
    padding: 0.5em 1em;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875em;
    font-family: var(--font-sans);
    border-radius: 0.625em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

body[data-page="vendor-time-tracking"] .tt-view-btn:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
}

body[data-page="vendor-time-tracking"] .tt-view-btn.active {
    background: var(--glass-secondary);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body[data-page="vendor-time-tracking"] .tt-view-panel {
    display: none;
}

body[data-page="vendor-time-tracking"] .tt-view-panel.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(0.25em); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   SCHICHTPLAN (Shift Calendar)
   ============================================================================ */

body[data-page="vendor-time-tracking"] .sp-calendar-toggle {
    display: flex;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.125em;
    gap: 0.125em;
}

body[data-page="vendor-time-tracking"] .sp-calendar-toggle button {
    padding: 0.375em 0.75em;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8125em;
    font-family: var(--font-sans);
    border-radius: 0.375em;
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-page="vendor-time-tracking"] .sp-calendar-toggle button.active {
    background: var(--glass-secondary);
    color: var(--text-primary);
}

body[data-page="vendor-time-tracking"] .sp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    margin-bottom: 1em;
}

body[data-page="vendor-time-tracking"] .sp-nav button {
    padding: 0.5em 1em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    border-radius: 0.5em;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.875em;
    transition: background 0.2s;
}

body[data-page="vendor-time-tracking"] .sp-nav button:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-time-tracking"] .sp-nav-label {
    font-family: var(--font-serif);
    font-size: 1.125em;
    color: var(--text-primary);
    min-width: 10em;
    text-align: center;
}

body[data-page="vendor-time-tracking"] .sp-staffing-bar {
    display: flex;
    gap: 0.25em;
    margin-bottom: 1em;
    justify-content: center;
}

body[data-page="vendor-time-tracking"] .sp-staffing-indicator {
    width: 2em;
    height: 0.375em;
    border-radius: 0.1875em;
    flex-shrink: 0;
}

body[data-page="vendor-time-tracking"] .sp-staffing-indicator.ok {
    background: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .sp-staffing-indicator.warning {
    background: var(--ios-system-orange, #FF9500);
}

body[data-page="vendor-time-tracking"] .sp-staffing-indicator.understaffed {
    background: var(--ios-system-red);
}

body[data-page="vendor-time-tracking"] .sp-week-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75em;
}

body[data-page="vendor-time-tracking"] .sp-day-column {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 0.75em;
    min-height: 18em;
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

body[data-page="vendor-time-tracking"] .sp-day-header {
    text-align: center;
    padding-bottom: 0.375em;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0.25em;
}

body[data-page="vendor-time-tracking"] .sp-day-label {
    font-size: 0.75em;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body[data-page="vendor-time-tracking"] .sp-day-date {
    font-size: 1em;
    color: var(--text-primary);
    font-weight: 600;
}

body[data-page="vendor-time-tracking"] .sp-day-header.today .sp-day-date {
    color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .sp-shift-card {
    background: var(--glass-secondary);
    border-radius: 0.5em;
    padding: 0.5em 0.625em;
    border-left: 3px solid var(--ios-system-orange);
    cursor: pointer;
    transition: background 0.2s;
}

body[data-page="vendor-time-tracking"] .sp-shift-card:hover {
    background: var(--glass-hover);
}

/* Color-coded left border by shift type */
body[data-page="vendor-time-tracking"] .sp-shift-card[data-shift-type="morning"] {
    border-left-color: var(--ios-system-orange, #FF9500);
}

body[data-page="vendor-time-tracking"] .sp-shift-card[data-shift-type="afternoon"] {
    border-left-color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .sp-shift-card[data-shift-type="night"] {
    border-left-color: var(--ios-system-purple, #AF52DE);
}

body[data-page="vendor-time-tracking"] .sp-shift-card[data-shift-type="oncall"] {
    border-left-color: var(--ios-system-yellow, #FFCC00);
}

body[data-page="vendor-time-tracking"] .sp-shift-card .sp-shift-name {
    font-size: 0.875em;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.3;
}

body[data-page="vendor-time-tracking"] .sp-shift-card .sp-shift-time {
    font-size: 0.8125em;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

body[data-page="vendor-time-tracking"] .sp-shift-card .sp-shift-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-size: 0.625em;
    padding: 0.125em 0.375em;
    border-radius: 0.25em;
    background: var(--glass-primary);
    color: var(--text-tertiary);
    margin-top: 0.25em;
}

/* Template indicator icon on shift card */
body[data-page="vendor-time-tracking"] .sp-shift-card .sp-template-icon {
    font-size: 0.625em;
    color: var(--text-quaternary);
}

body[data-page="vendor-time-tracking"] .sp-add-btn {
    background: var(--glass-primary);
    border: 1px dashed var(--glass-border);
    border-radius: 0.375em;
    padding: 0.25em;
    color: var(--text-tertiary);
    cursor: pointer;
    text-align: center;
    font-size: 0.75em;
    transition: all 0.2s;
}

body[data-page="vendor-time-tracking"] .sp-add-btn:hover {
    background: var(--glass-hover);
    color: var(--text-secondary);
}

body[data-page="vendor-time-tracking"] .sp-month-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25em;
}

body[data-page="vendor-time-tracking"] .sp-month-cell {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.375em;
    min-height: 4em;
    cursor: pointer;
    transition: background 0.2s;
}

body[data-page="vendor-time-tracking"] .sp-month-cell:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-time-tracking"] .sp-month-cell .sp-cell-date {
    font-size: 0.75em;
    color: var(--text-secondary);
}

body[data-page="vendor-time-tracking"] .sp-month-cell .sp-cell-count {
    font-size: 0.6875em;
    color: var(--ios-system-orange);
    margin-top: 0.25em;
}

/* ============================================================================
   URLAUB (Vacation & Sick Days)
   ============================================================================ */

body[data-page="vendor-time-tracking"] .ur-sub-tabs {
    display: flex;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.125em;
    gap: 0.125em;
    margin-bottom: 1.25em;
    width: fit-content;
}

body[data-page="vendor-time-tracking"] .ur-sub-tabs button {
    padding: 0.375em 0.75em;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8125em;
    font-family: var(--font-sans);
    border-radius: 0.375em;
    cursor: pointer;
    transition: all 0.2s;
}

body[data-page="vendor-time-tracking"] .ur-sub-tabs button.active {
    background: var(--glass-secondary);
    color: var(--text-primary);
}

body[data-page="vendor-time-tracking"] .ur-balance {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75em;
    margin-bottom: 1.5em;
}

body[data-page="vendor-time-tracking"] .ur-balance-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 1em;
    text-align: center;
}

body[data-page="vendor-time-tracking"] .ur-balance-value {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

body[data-page="vendor-time-tracking"] .ur-balance-label {
    font-size: 0.75em;
    color: var(--text-secondary);
    margin-top: 0.25em;
}

body[data-page="vendor-time-tracking"] .ur-request-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 1em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    margin-bottom: 0.75em;
}

body[data-page="vendor-time-tracking"] .ur-request-info {
    flex: 1;
}

body[data-page="vendor-time-tracking"] .ur-request-name {
    font-weight: 500;
    color: var(--text-primary);
}

body[data-page="vendor-time-tracking"] .ur-request-dates {
    font-size: 0.875em;
    color: var(--text-secondary);
}

body[data-page="vendor-time-tracking"] .ur-request-days {
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

body[data-page="vendor-time-tracking"] .ur-status-badge {
    display: inline-block;
    font-size: 0.75em;
    padding: 0.1875em 0.5em;
    border-radius: 1em;
    font-weight: 500;
}

body[data-page="vendor-time-tracking"] .ur-status-badge.pending {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange, #FF9500);
}

body[data-page="vendor-time-tracking"] .ur-status-badge.approved {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .ur-status-badge.rejected {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

body[data-page="vendor-time-tracking"] .ur-status-badge.sick {
    background: rgba(175, 82, 222, 0.15);
    color: var(--ios-system-purple, #AF52DE);
}

body[data-page="vendor-time-tracking"] .ur-conflict-warning {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 0.5em;
    padding: 0.75em 1em;
    color: var(--ios-system-red);
    font-size: 0.875em;
    margin-bottom: 0.75em;
}

body[data-page="vendor-time-tracking"] .ur-section-title {
    font-family: var(--font-serif);
    font-size: 1.125em;
    color: var(--text-primary);
    margin-bottom: 0.75em;
    margin-top: 1.5em;
}

body[data-page="vendor-time-tracking"] .ur-actions {
    display: flex;
    gap: 0.5em;
}

body[data-page="vendor-time-tracking"] .ur-approve-btn {
    padding: 0.375em 0.75em;
    border: none;
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
    border-radius: 0.5em;
    cursor: pointer;
    font-size: 0.8125em;
    font-family: var(--font-sans);
    transition: background 0.2s;
}

body[data-page="vendor-time-tracking"] .ur-approve-btn:hover {
    background: rgba(52, 199, 89, 0.25);
}

body[data-page="vendor-time-tracking"] .ur-reject-btn {
    padding: 0.375em 0.75em;
    border: none;
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
    border-radius: 0.5em;
    cursor: pointer;
    font-size: 0.8125em;
    font-family: var(--font-sans);
    transition: background 0.2s;
}

body[data-page="vendor-time-tracking"] .ur-reject-btn:hover {
    background: rgba(255, 59, 48, 0.25);
}

body[data-page="vendor-time-tracking"] .ur-sick-table {
    width: 100%;
    border-collapse: collapse;
}

body[data-page="vendor-time-tracking"] .ur-sick-table th,
body[data-page="vendor-time-tracking"] .ur-sick-table td {
    padding: 0.625em 0.75em;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.875em;
}

body[data-page="vendor-time-tracking"] .ur-sick-table th {
    color: var(--text-tertiary);
    font-weight: 500;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body[data-page="vendor-time-tracking"] .ur-sick-table td {
    color: var(--text-primary);
}

/* ============================================================================
   ARBEITSZEIT (Working Hours Overview)
   ============================================================================ */

body[data-page="vendor-time-tracking"] .az-period-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    margin-bottom: 1.25em;
}

body[data-page="vendor-time-tracking"] .az-period-nav button {
    padding: 0.375em 0.75em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    border-radius: 0.5em;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background 0.2s;
}

body[data-page="vendor-time-tracking"] .az-period-nav button:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-time-tracking"] .az-period-label {
    font-family: var(--font-serif);
    font-size: 1.125em;
    color: var(--text-primary);
    min-width: 10em;
    text-align: center;
}

body[data-page="vendor-time-tracking"] .az-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75em;
    margin-bottom: 1.5em;
}

body[data-page="vendor-time-tracking"] .az-summary-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 1em;
    text-align: center;
}

body[data-page="vendor-time-tracking"] .az-summary-value {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

body[data-page="vendor-time-tracking"] .az-summary-value.positive {
    color: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .az-summary-value.negative {
    color: var(--ios-system-red);
}

body[data-page="vendor-time-tracking"] .az-summary-label {
    font-size: 0.75em;
    color: var(--text-secondary);
    margin-top: 0.25em;
}

body[data-page="vendor-time-tracking"] .az-team-table {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    overflow: hidden;
}

/* Table-based .az-table-row styles defined below with the actual <table> rules */

/* Old grid-based az-weekly-breakdown rules replaced by table-compatible rules below */

body[data-page="vendor-time-tracking"] .az-day-cell {
    text-align: center;
    padding: 0.25em;
    border-radius: 0.25em;
}

body[data-page="vendor-time-tracking"] .az-day-cell.anomalous {
    background: rgba(255, 59, 48, 0.1);
    color: var(--ios-system-red);
}

body[data-page="vendor-time-tracking"] .az-status-badge {
    display: inline-block;
    font-size: 0.6875em;
    padding: 0.1875em 0.5em;
    border-radius: 1em;
    font-weight: 500;
}

body[data-page="vendor-time-tracking"] .az-status-badge.open {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange, #FF9500);
}

body[data-page="vendor-time-tracking"] .az-status-badge.confirmed {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .az-status-badge.locked {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
}

body[data-page="vendor-time-tracking"] .az-confirm-btn {
    padding: 0.625em 1.5em;
    border: none;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border-radius: 0.5em;
    cursor: pointer;
    font-size: 0.875em;
    font-family: var(--font-sans);
    font-weight: 500;
    transition: opacity 0.2s;
    margin-top: 1em;
}

body[data-page="vendor-time-tracking"] .az-confirm-btn:hover {
    opacity: 0.85;
}

/* Urlaub: Sub-panels */
body[data-page="vendor-time-tracking"] .ur-sub-panel {
    display: none;
}

body[data-page="vendor-time-tracking"] .ur-sub-panel.active {
    display: block;
}

/* Urlaub: Pending section */
body[data-page="vendor-time-tracking"] .ur-pending-section {
    margin-bottom: 1.5em;
}

body[data-page="vendor-time-tracking"] .ur-pending-actions {
    display: flex;
    gap: 0.5em;
    margin-top: 0.5em;
}

body[data-page="vendor-time-tracking"] .ur-cancel-btn {
    padding: 0.25em 0.5em;
    font-size: 0.75em;
}

body[data-page="vendor-time-tracking"] .ur-request-type {
    font-size: 0.8125em;
    color: var(--text-secondary);
    margin-left: 0.5em;
}

body[data-page="vendor-time-tracking"] .ur-request-notes {
    margin-top: 0.25em;
}

body[data-page="vendor-time-tracking"] .ur-sick-filter {
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin-bottom: 1em;
}

body[data-page="vendor-time-tracking"] .ur-period-select {
    max-width: 10em;
}

/* Schichtplan: Day-add button */
body[data-page="vendor-time-tracking"] .sp-day-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.375em;
    background: transparent;
    border: 1px dashed var(--glass-border);
    border-radius: 0.375em;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.375em;
}

body[data-page="vendor-time-tracking"] .sp-day-add:hover {
    background: var(--glass-hover);
    color: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
}

/* Schichtplan: Nav controls */
body[data-page="vendor-time-tracking"] .sp-nav-controls {
    display: flex;
    gap: 0.25em;
    align-items: center;
}

body[data-page="vendor-time-tracking"] .sp-today-btn {
    font-size: 0.8125em;
}

body[data-page="vendor-time-tracking"] .sp-settings-btn {
    margin-top: 1em;
}

/* Schichtplan: Month view helpers */
body[data-page="vendor-time-tracking"] .sp-month-header {
    text-align: center;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5em 0;
    text-transform: uppercase;
}

body[data-page="vendor-time-tracking"] .sp-month-empty {
    background: transparent;
    border: none;
}

body[data-page="vendor-time-tracking"] .sp-month-date {
    font-size: 0.8125em;
    color: var(--text-primary);
    font-weight: 500;
}

body[data-page="vendor-time-tracking"] .sp-month-badge {
    display: inline-block;
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
    font-size: 0.6875em;
    padding: 0.125em 0.375em;
    border-radius: 0.75em;
    margin-top: 0.25em;
}

body[data-page="vendor-time-tracking"] .sp-shift-card-editable {
    cursor: pointer;
}

body[data-page="vendor-time-tracking"] .sp-shift-card-editable:hover {
    background: var(--glass-hover);
}

/* Arbeitszeit: Table (actual HTML table, not grid) */
body[data-page="vendor-time-tracking"] .az-team-table table {
    width: 100%;
    border-collapse: collapse;
}

body[data-page="vendor-time-tracking"] .az-team-table th,
body[data-page="vendor-time-tracking"] .az-team-table td {
    padding: 0.625em 0.5em;
    text-align: left;
    font-size: 0.8125em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-time-tracking"] .az-team-table th {
    color: var(--text-tertiary);
    font-weight: 500;
    font-size: 0.6875em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body[data-page="vendor-time-tracking"] .az-team-table td {
    color: var(--text-primary);
}

body[data-page="vendor-time-tracking"] .az-team-table tr.az-table-row {
    cursor: pointer;
    transition: background 0.2s;
}

body[data-page="vendor-time-tracking"] .az-team-table tr.az-table-row:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-time-tracking"] .az-emp-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25em;
}

body[data-page="vendor-time-tracking"] .az-expand-icon {
    font-size: 0.75em;
    color: var(--text-tertiary);
}

body[data-page="vendor-time-tracking"] .az-breakdown-row td {
    padding: 0;
    border-bottom: none;
}

body[data-page="vendor-time-tracking"] .az-weekly-breakdown {
    display: block;
    padding: 0.75em 1em;
    background: var(--glass-secondary);
    border-radius: 0.5em;
    margin: 0.5em 0;
}

body[data-page="vendor-time-tracking"] .az-week-row {
    display: grid;
    grid-template-columns: 3.5em repeat(7, 1fr) 4em;
    gap: 0.25em;
    padding: 0.25em 0;
    font-size: 0.8125em;
    color: var(--text-secondary);
    align-items: center;
}

body[data-page="vendor-time-tracking"] .az-week-row.az-week-header {
    color: var(--text-tertiary);
    font-size: 0.75em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.375em;
    margin-bottom: 0.25em;
}

body[data-page="vendor-time-tracking"] .az-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1em;
}

body[data-page="vendor-time-tracking"] .az-hide-mobile {
    /* visible by default */
}

/* Staffing modal rows */
body[data-page="vendor-time-tracking"] .staffing-row {
    align-items: flex-end;
}

/* Status badges on the table: extend existing .az-status-badge with status prefix */
body[data-page="vendor-time-tracking"] .az-status-open {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange, #FF9500);
}

body[data-page="vendor-time-tracking"] .az-status-confirmed {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .az-status-locked {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
}

/* Urlaub: Status badge with ur- prefix for pending/approved etc */
body[data-page="vendor-time-tracking"] .ur-status-pending {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange, #FF9500);
}

body[data-page="vendor-time-tracking"] .ur-status-approved {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .ur-status-rejected {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

body[data-page="vendor-time-tracking"] .ur-status-cancelled {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
}

/* ============================================================================
   SCHICHTPLAN: Wider layout for Schichtplan panel
   ============================================================================ */

body[data-page="vendor-time-tracking"] .tt-view-panel[data-panel="schichtplan"] {
    max-width: none;
    margin-left: -4em;
    margin-right: -4em;
    padding-left: 1em;
    padding-right: 1em;
    padding-left: 1em;
    padding-right: 1em;
}

/* ============================================================================
   LANGZEIT-SCHICHTPLAN (Template Section)
   ============================================================================ */

body[data-page="vendor-time-tracking"] .sp-template-section {
    margin-bottom: 1.5em;
}

body[data-page="vendor-time-tracking"] .sp-template-toggle {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.625em 1em;
    width: 100%;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    border-radius: 0.75em;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 500;
    transition: background 0.2s;
    text-align: left;
}

body[data-page="vendor-time-tracking"] .sp-template-toggle:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-time-tracking"] .sp-template-toggle .radix-icon {
    transition: transform 0.2s;
    font-size: 0.875em;
    color: var(--text-tertiary);
}

body[data-page="vendor-time-tracking"] .sp-template-toggle.expanded .radix-icon {
    transform: rotate(180deg);
}

body[data-page="vendor-time-tracking"] .sp-template-count {
    font-size: 0.75em;
    background: var(--glass-secondary);
    color: var(--text-secondary);
    padding: 0.125em 0.5em;
    border-radius: 9999px;
    margin-left: auto;
}

body[data-page="vendor-time-tracking"] .sp-template-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin-top: 0.75em;
}

body[data-page="vendor-time-tracking"] .sp-template-card {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 0.75em 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    transition: background 0.2s;
}

body[data-page="vendor-time-tracking"] .sp-template-card:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-time-tracking"] .sp-template-card.active {
    border-left: 3px solid var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .sp-template-info {
    flex: 1;
    min-width: 0;
}

body[data-page="vendor-time-tracking"] .sp-template-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375em;
}

body[data-page="vendor-time-tracking"] .sp-template-dates {
    font-size: 0.8125em;
    color: var(--text-secondary);
    margin-top: 0.125em;
}

body[data-page="vendor-time-tracking"] .sp-template-entries {
    font-size: 0.75em;
    color: var(--text-tertiary);
}

body[data-page="vendor-time-tracking"] .sp-template-status {
    display: inline-block;
    font-size: 0.6875em;
    padding: 0.1875em 0.5em;
    border-radius: 9999px;
    font-weight: 500;
    flex-shrink: 0;
}

body[data-page="vendor-time-tracking"] .sp-template-status.draft {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
}

body[data-page="vendor-time-tracking"] .sp-template-status.active {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .sp-template-status.expired {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

body[data-page="vendor-time-tracking"] .sp-template-status.archived {
    background: var(--glass-secondary);
    color: var(--text-quaternary);
}

body[data-page="vendor-time-tracking"] .sp-template-actions {
    display: flex;
    gap: 0.25em;
    flex-shrink: 0;
}

body[data-page="vendor-time-tracking"] .sp-template-actions button {
    padding: 0.375em 0.625em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-secondary);
    border-radius: 0.375em;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.75em;
    transition: all 0.15s;
}

body[data-page="vendor-time-tracking"] .sp-template-actions button:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
}

body[data-page="vendor-time-tracking"] .sp-template-actions .sp-tpl-generate:hover {
    color: var(--ios-system-green);
    border-color: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .sp-template-actions .sp-tpl-delete:hover {
    color: var(--ios-system-red);
    border-color: var(--ios-system-red);
}

body[data-page="vendor-time-tracking"] .sp-template-new {
    margin-top: 0.5em;
    width: 100%;
    justify-content: center;
    gap: 0.375em;
    font-size: 0.875em;
}

/* ============================================================================
   TEMPLATE MODAL
   ============================================================================ */

body[data-page="vendor-time-tracking"] .sp-template-modal .modal-body {
    max-width: 90vw;
    width: 90vw;
}

body[data-page="vendor-time-tracking"] .sp-template-steps {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1.5em;
}

body[data-page="vendor-time-tracking"] .sp-template-step {
    display: flex;
    align-items: center;
    gap: 0.375em;
    font-size: 0.8125em;
    color: var(--text-tertiary);
    font-weight: 500;
}

body[data-page="vendor-time-tracking"] .sp-template-step.active {
    color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .sp-template-step.completed {
    color: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .sp-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    background: var(--glass-secondary);
    font-size: 0.875em;
    font-weight: 600;
}

body[data-page="vendor-time-tracking"] .sp-template-step.active .sp-step-number {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .sp-step-divider {
    width: 2em;
    height: 1px;
    background: var(--glass-border);
    align-self: center;
}

/* Pattern grid (7 columns like week view) */
body[data-page="vendor-time-tracking"] .sp-pattern-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75em;
}

body[data-page="vendor-time-tracking"] .sp-pattern-column {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 0.75em;
    min-height: 16em;
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

body[data-page="vendor-time-tracking"] .sp-pattern-day-label {
    text-align: center;
    font-size: 0.8125em;
    font-weight: 600;
    color: var(--text-secondary);
    padding-bottom: 0.375em;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0.25em;
}

body[data-page="vendor-time-tracking"] .sp-pattern-entries {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
    flex: 1;
}

body[data-page="vendor-time-tracking"] .sp-pattern-entry {
    background: var(--glass-secondary);
    border-radius: 0.375em;
    padding: 0.375em 0.5em;
    border-left: 2px solid var(--ios-system-orange);
    position: relative;
}

body[data-page="vendor-time-tracking"] .sp-pattern-entry-name {
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-primary);
}

body[data-page="vendor-time-tracking"] .sp-pattern-entry-time {
    font-size: 0.6875em;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

body[data-page="vendor-time-tracking"] .sp-pattern-entry-remove {
    position: absolute;
    top: 0.125em;
    right: 0.125em;
    width: 1.25em;
    height: 1.25em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-quaternary);
    cursor: pointer;
    border-radius: 50%;
    font-size: 0.75em;
    transition: all 0.15s;
}

body[data-page="vendor-time-tracking"] .sp-pattern-entry-remove:hover {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

/* Inline add form within pattern column */
body[data-page="vendor-time-tracking"] .sp-pattern-add-form {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
    padding: 0.5em;
    background: var(--glass-secondary);
    border-radius: 0.375em;
    border: 1px dashed var(--glass-border);
}

body[data-page="vendor-time-tracking"] .sp-pattern-add-form select,
body[data-page="vendor-time-tracking"] .sp-pattern-add-form input {
    padding: 0.25em 0.375em;
    border-radius: 0.25em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-size: 0.75em;
    font-family: inherit;
    width: 100%;
}

body[data-page="vendor-time-tracking"] .sp-pattern-add-form select:focus,
body[data-page="vendor-time-tracking"] .sp-pattern-add-form input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-time-tracking"] .sp-pattern-add-actions {
    display: flex;
    gap: 0.25em;
}

body[data-page="vendor-time-tracking"] .sp-pattern-add-actions button {
    flex: 1;
    padding: 0.25em;
    border: none;
    border-radius: 0.25em;
    font-size: 0.75em;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: opacity 0.15s;
}

body[data-page="vendor-time-tracking"] .sp-pattern-confirm {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-time-tracking"] .sp-pattern-cancel {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

body[data-page="vendor-time-tracking"] .sp-pattern-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.375em;
    background: transparent;
    border: 1px dashed var(--glass-border);
    border-radius: 0.375em;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 0.75em;
    transition: all 0.2s;
    margin-top: auto;
}

body[data-page="vendor-time-tracking"] .sp-pattern-add-btn:hover {
    background: var(--glass-hover);
    color: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
}

/* Template modal footer buttons */
body[data-page="vendor-time-tracking"] .sp-template-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5em;
    gap: 0.5em;
}

body[data-page="vendor-time-tracking"] .sp-template-footer-right {
    display: flex;
    gap: 0.5em;
}

/* Generation result message */
body[data-page="vendor-time-tracking"] .sp-generate-result {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.75em 1em;
    border-radius: 0.5em;
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.3);
    color: var(--ios-system-green);
    font-size: 0.875em;
    margin-top: 0.75em;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 48em) {
    body[data-page="vendor-time-tracking"] .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-page="vendor-time-tracking"] .clock-display {
        font-size: 3em;
    }

    body[data-page="vendor-time-tracking"] .clock-elapsed {
        font-size: 1.75em;
    }

    body[data-page="vendor-time-tracking"] .tt-page-header {
        flex-direction: column;
    }

    body[data-page="vendor-time-tracking"] .sp-week-view {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-page="vendor-time-tracking"] .ur-balance {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-page="vendor-time-tracking"] .az-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-page="vendor-time-tracking"] .az-hide-mobile {
        display: none;
    }

    body[data-page="vendor-time-tracking"] .sp-month-view {
        gap: 0.125em;
    }

    body[data-page="vendor-time-tracking"] .sp-month-cell {
        min-height: 3em;
        padding: 0.25em;
    }

    body[data-page="vendor-time-tracking"] .tt-view-switcher {
        width: 100%;
    }

    body[data-page="vendor-time-tracking"] .tt-view-btn {
        flex: 1;
        text-align: center;
        padding: 0.5em 0.5em;
        font-size: 0.8125em;
    }

    /* Template card stacks on mobile */
    body[data-page="vendor-time-tracking"] .sp-template-card {
        flex-wrap: wrap;
    }

    body[data-page="vendor-time-tracking"] .sp-template-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Pattern grid: 2 columns on tablet */
    body[data-page="vendor-time-tracking"] .sp-pattern-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Schichtplan wider layout reset */
    body[data-page="vendor-time-tracking"] .tt-view-panel[data-panel="schichtplan"] {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 30em) {
    body[data-page="vendor-time-tracking"] .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5em;
    }

    body[data-page="vendor-time-tracking"] .clock-display {
        font-size: 2.5em;
    }

    body[data-page="vendor-time-tracking"] .entry-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5em;
        padding: 1em;
    }

    body[data-page="vendor-time-tracking"] .entry-duration {
        text-align: center;
    }

    body[data-page="vendor-time-tracking"] .entry-job {
        white-space: normal;
    }

    body[data-page="vendor-time-tracking"] .entries-header {
        flex-direction: column;
        align-items: flex-start;
    }

    body[data-page="vendor-time-tracking"] .sp-week-view {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-time-tracking"] .sp-day-column {
        min-height: auto;
    }

    /* Pattern grid: 1 column on phone */
    body[data-page="vendor-time-tracking"] .sp-pattern-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-time-tracking"] .sp-pattern-column {
        min-height: auto;
    }

    body[data-page="vendor-time-tracking"] .ur-balance {
        grid-template-columns: 1fr 1fr;
        gap: 0.5em;
    }

    body[data-page="vendor-time-tracking"] .ur-request-card {
        flex-direction: column;
        align-items: flex-start;
    }

    body[data-page="vendor-time-tracking"] .az-summary-cards {
        grid-template-columns: 1fr 1fr;
        gap: 0.5em;
    }

    body[data-page="vendor-time-tracking"] .az-team-table {
        overflow-x: auto;
    }

    body[data-page="vendor-time-tracking"] .az-week-row {
        grid-template-columns: 2.5em repeat(7, 1fr) 3em;
        font-size: 0.75em;
    }
}

/**
 * @file schema-inspector.css
 * @description Schema Inspector page styles for COEUS admin panel
 * @page schema-inspector
 *
 * Scoped via body[data-page="schema-inspector"]
 * Uses theme variables, em units, glass design system
 */

/* ============================================ */
/*              PAGE LAYOUT                     */
/* ============================================ */

body[data-page="schema-inspector"] .schema-page-container {
    max-width: 75em;
    margin: 0 auto;
    padding: 1.5em;
}

body[data-page="schema-inspector"] .schema-page-header {
    margin-bottom: 1.5em;
}

body[data-page="schema-inspector"] .schema-page-header h1 {
    margin-bottom: 0.25em;
}

body[data-page="schema-inspector"] .schema-page-subtitle {
    color: var(--text-secondary);
}

/* ============================================ */
/*              TAB NAVIGATION                  */
/* ============================================ */

body[data-page="schema-inspector"] .schema-tabs {
    display: flex;
    gap: 0.25em;
    margin-bottom: 1.5em;
    border-bottom: 0.0625em solid var(--glass-border);
    padding-bottom: 0;
}

body[data-page="schema-inspector"] .schema-tab-btn {
    padding: 0.625em 1.25em;
    background: transparent;
    border: none;
    border-bottom: 0.125em solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 500;
    transition: color 0.2s ease, border-color 0.2s ease;
    margin-bottom: -0.0625em;
}

body[data-page="schema-inspector"] .schema-tab-btn:hover {
    color: var(--text-primary);
}

body[data-page="schema-inspector"] .schema-tab-btn.active {
    color: var(--ios-system-orange);
    border-bottom-color: var(--ios-system-orange);
}

body[data-page="schema-inspector"] .schema-tab-panel {
    display: none;
}

body[data-page="schema-inspector"] .schema-tab-panel.active {
    display: block;
}

/* ============================================ */
/*              SEARCH BAR                      */
/* ============================================ */

body[data-page="schema-inspector"] .schema-search-container {
    margin-bottom: 1em;
}

body[data-page="schema-inspector"] .schema-search-input {
    width: 100%;
    padding: 0.625em 1em;
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    outline: none;
    transition: border-color 0.2s ease;
}

body[data-page="schema-inspector"] .schema-search-input::placeholder {
    color: var(--text-tertiary);
}

body[data-page="schema-inspector"] .schema-search-input:focus {
    border-color: var(--ios-system-orange);
}

/* ============================================ */
/*              STATS BAR                       */
/* ============================================ */

body[data-page="schema-inspector"] .schema-stats-bar {
    display: flex;
    gap: 1em;
    margin-bottom: 1.25em;
    flex-wrap: wrap;
}

body[data-page="schema-inspector"] .schema-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.75em;
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 1em;
    font-size: 0.8125em;
    color: var(--text-secondary);
}

body[data-page="schema-inspector"] .schema-stat-chip .stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================ */
/*              TABLE LIST (Tables Tab)         */
/* ============================================ */

body[data-page="schema-inspector"] .schema-table-group {
    margin-bottom: 0.5em;
}

body[data-page="schema-inspector"] .schema-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625em 1em;
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.5em;
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
}

body[data-page="schema-inspector"] .schema-table-header:hover {
    background: var(--glass-hover);
}

body[data-page="schema-inspector"] .schema-table-name {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
}

body[data-page="schema-inspector"] .schema-table-meta {
    display: flex;
    align-items: center;
    gap: 0.75em;
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

body[data-page="schema-inspector"] .schema-expand-icon {
    transition: transform 0.2s ease;
    font-size: 0.75em;
    color: var(--text-tertiary);
}

body[data-page="schema-inspector"] .schema-table-group.expanded .schema-expand-icon {
    transform: rotate(90deg);
}

body[data-page="schema-inspector"] .schema-columns-panel {
    display: none;
    margin-top: 0.125em;
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.5em;
    overflow: hidden;
}

body[data-page="schema-inspector"] .schema-table-group.expanded .schema-columns-panel {
    display: block;
}

body[data-page="schema-inspector"] .schema-column-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 0.5fr 2fr;
    gap: 0.5em;
    padding: 0.5em 1em;
    font-size: 0.8125em;
    border-bottom: 0.0625em solid var(--glass-border);
    align-items: center;
}

body[data-page="schema-inspector"] .schema-column-row:last-child {
    border-bottom: none;
}

body[data-page="schema-inspector"] .schema-column-row.column-header {
    background: var(--glass-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body[data-page="schema-inspector"] .schema-col-name {
    font-family: monospace;
    color: var(--text-primary);
}

body[data-page="schema-inspector"] .schema-col-type {
    color: var(--ios-system-orange);
    font-family: monospace;
    font-size: 0.9em;
}

body[data-page="schema-inspector"] .schema-col-nullable {
    text-align: center;
}

body[data-page="schema-inspector"] .schema-col-default {
    color: var(--text-tertiary);
    font-family: monospace;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================ */
/*              ENDPOINT MAP (Endpoints Tab)    */
/* ============================================ */

body[data-page="schema-inspector"] .schema-route-file {
    margin-bottom: 0.75em;
}

body[data-page="schema-inspector"] .schema-route-file-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625em 1em;
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.5em;
    cursor: pointer;
    transition: background 0.2s ease;
}

body[data-page="schema-inspector"] .schema-route-file-header:hover {
    background: var(--glass-hover);
}

body[data-page="schema-inspector"] .schema-route-file-name {
    font-weight: 600;
    font-family: monospace;
    color: var(--text-primary);
    font-size: 0.875em;
}

body[data-page="schema-inspector"] .schema-route-file-stats {
    display: flex;
    gap: 0.75em;
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

body[data-page="schema-inspector"] .schema-route-details {
    display: none;
    margin-top: 0.125em;
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.75em 1em;
}

body[data-page="schema-inspector"] .schema-route-file.expanded .schema-route-details {
    display: block;
}

body[data-page="schema-inspector"] .schema-endpoint-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.25em 0;
    font-size: 0.8125em;
}

body[data-page="schema-inspector"] .schema-method-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.5em;
    padding: 0.125em 0.375em;
    border-radius: 0.25em;
    font-size: 0.75em;
    font-weight: 700;
    font-family: monospace;
    text-transform: uppercase;
}

body[data-page="schema-inspector"] .schema-method-badge.method-get {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="schema-inspector"] .schema-method-badge.method-post {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="schema-inspector"] .schema-method-badge.method-put,
body[data-page="schema-inspector"] .schema-method-badge.method-patch {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange, #FF9500);
}

body[data-page="schema-inspector"] .schema-method-badge.method-delete {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

body[data-page="schema-inspector"] .schema-endpoint-path {
    font-family: monospace;
    color: var(--text-primary);
}

body[data-page="schema-inspector"] .schema-route-tables-section {
    margin-top: 0.75em;
    padding-top: 0.75em;
    border-top: 0.0625em solid var(--glass-border);
}

body[data-page="schema-inspector"] .schema-route-section-label {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375em;
}

body[data-page="schema-inspector"] .schema-table-tag {
    display: inline-flex;
    padding: 0.125em 0.5em;
    margin: 0.125em;
    background: var(--glass-secondary);
    border-radius: 0.25em;
    font-size: 0.8125em;
    font-family: monospace;
    color: var(--text-secondary);
}

/* ============================================ */
/*              GHOST ANALYSIS (Ghosts Tab)     */
/* ============================================ */

body[data-page="schema-inspector"] .schema-coverage-bar {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 1.5em;
    padding: 1em;
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.5em;
}

body[data-page="schema-inspector"] .schema-coverage-percentage {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 3em;
    text-align: center;
}

body[data-page="schema-inspector"] .schema-coverage-meter {
    flex: 1;
    height: 0.5em;
    background: var(--glass-secondary);
    border-radius: 0.25em;
    overflow: hidden;
}

body[data-page="schema-inspector"] .schema-coverage-fill {
    height: 100%;
    border-radius: 0.25em;
    transition: width 0.5s ease;
    background: var(--ios-system-green);
}

body[data-page="schema-inspector"] .schema-ghost-section {
    margin-bottom: 1.5em;
}

body[data-page="schema-inspector"] .schema-ghost-section-title {
    font-weight: 600;
    margin-bottom: 0.75em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="schema-inspector"] .schema-ghost-count {
    font-size: 0.8125em;
    font-weight: 400;
    color: var(--text-tertiary);
}

body[data-page="schema-inspector"] .schema-ghost-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375em;
}

body[data-page="schema-inspector"] .schema-ghost-tag {
    display: inline-flex;
    padding: 0.25em 0.625em;
    border-radius: 0.375em;
    font-size: 0.8125em;
    font-family: monospace;
    font-weight: 500;
}

body[data-page="schema-inspector"] .schema-ghost-tag.ghost {
    background: rgba(255, 59, 48, 0.12);
    color: var(--ios-system-red);
    border: 0.0625em solid rgba(255, 59, 48, 0.25);
}

body[data-page="schema-inspector"] .schema-ghost-tag.active {
    background: rgba(52, 199, 89, 0.12);
    color: var(--ios-system-green);
    border: 0.0625em solid rgba(52, 199, 89, 0.25);
}

body[data-page="schema-inspector"] .schema-ghost-tag.code-only {
    background: rgba(255, 149, 0, 0.12);
    color: var(--ios-system-orange, #FF9500);
    border: 0.0625em solid rgba(255, 149, 0, 0.25);
}

/* ============================================ */
/*              LOADING & EMPTY STATES          */
/* ============================================ */

body[data-page="schema-inspector"] .schema-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3em;
    color: var(--text-tertiary);
    font-size: 0.875em;
}

body[data-page="schema-inspector"] .schema-loading-spinner {
    width: 1.25em;
    height: 1.25em;
    border: 0.125em solid var(--glass-border);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: schema-spin 0.6s linear infinite;
    margin-right: 0.5em;
}

@keyframes schema-spin {
    to { transform: rotate(360deg); }
}

body[data-page="schema-inspector"] .schema-empty {
    text-align: center;
    padding: 3em;
    color: var(--text-tertiary);
    font-size: 0.875em;
}

/* ============================================ */
/*              RESPONSIVE                      */
/* ============================================ */

@media (max-width: 48em) {
    body[data-page="schema-inspector"] .schema-column-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.25em;
    }

    body[data-page="schema-inspector"] .schema-column-row .schema-col-nullable,
    body[data-page="schema-inspector"] .schema-column-row .schema-col-default {
        display: none;
    }

    body[data-page="schema-inspector"] .schema-column-row.column-header .schema-col-nullable,
    body[data-page="schema-inspector"] .schema-column-row.column-header .schema-col-default {
        display: none;
    }

    body[data-page="schema-inspector"] .schema-stats-bar {
        flex-direction: column;
        gap: 0.5em;
    }

    body[data-page="schema-inspector"] .schema-coverage-bar {
        flex-direction: column;
        text-align: center;
    }

    body[data-page="schema-inspector"] .schema-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/**
 * @file vendor-dokumente.css
 * @filepath public/css/pages/vendor-dokumente.css
 * @description Styles for vendor document management page.
 *   Aligned with owner page (documents.css): .modal/.modal.open pattern,
 *   glass header bar, filter modal, delete modal, toast notifications,
 *   two-column viewer, upload with progress, full pagination.
 * @created 2026-02-10
 * @updated 2026-03-02 - A4 aspect-ratio cards with full thumbnails, --font-scale support
 * @updated 2026-03-07 - AI badge, tag pills on cards + viewer, badges-left flex container
 * @updated 2026-03-15 - Structured viewer left panel: section separators, section-header
 *   (title + badge row), financial section styling mirroring owner viewer
 * Scoped via body[data-page="vendor-dokumente"]
 */

/* ==== Page Container ==== */
body[data-page="vendor-dokumente"] .vendor-page-container {
    max-width: 87.5em;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* ==== Glass Header Bar ==== */
body[data-page="vendor-dokumente"] .vd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--glass-primary);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
}

body[data-page="vendor-dokumente"] .vd-header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

body[data-page="vendor-dokumente"] .back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5em;
    height: 2.5em;
    border-radius: var(--radius-md);
    background: var(--glass-secondary);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    text-decoration: none;
}

body[data-page="vendor-dokumente"] .back-link:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-dokumente"] .vd-header-right {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: wrap;
}

/* ==== Search Container ==== */
body[data-page="vendor-dokumente"] .vd-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

body[data-page="vendor-dokumente"] .vd-search-icon {
    position: absolute;
    left: 0.75em;
    color: var(--text-tertiary);
    pointer-events: none;
}

body[data-page="vendor-dokumente"] .vd-search-input {
    padding: 0.5em 1em;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-secondary);
    color: var(--text-primary);
    font-size: calc(0.875em * var(--font-scale, 1));
    min-width: 14em;
    transition: border-color 0.2s ease;
}

body[data-page="vendor-dokumente"] .vd-search-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-dokumente"] .vd-search-input::placeholder {
    color: var(--text-tertiary);
}

/* ==== Filter Badge ==== */
body[data-page="vendor-dokumente"] .vd-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25em;
    height: 1.25em;
    padding: 0 0.25em;
    border-radius: 50%;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-size: 0.7em;
    font-weight: 600;
    line-height: 1;
}

/* ==== Upload Button Accent ==== */
body[data-page="vendor-dokumente"] .vd-upload-btn {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border: none;
}

body[data-page="vendor-dokumente"] .vd-upload-btn:hover {
    opacity: 0.9;
}

/* ==== Documents Grid ==== */
body[data-page="vendor-dokumente"] .documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17.5em, 1fr));
    gap: 1.5em;
    padding: 1em;
    margin-bottom: var(--spacing-lg);
}

body[data-page="vendor-dokumente"] .document-card {
    background: var(--glass-primary);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    /* A4 aspect ratio — matches owner document cards */
    aspect-ratio: 1 / 1.414;
    width: 100%;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        0 0.5em 1em rgba(0, 0, 0, 0.08),
        0 0.125em 0.25em rgba(0, 0, 0, 0.04);
}

body[data-page="vendor-dokumente"] .document-card:hover {
    transform: translateY(-0.25em) scale(1.01);
    background: var(--glass-hover);
    border-color: var(--text-tertiary);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        0 1em 2em rgba(0, 0, 0, 0.12),
        0 0.25em 0.5em rgba(0, 0, 0, 0.06);
}

/* Thumbnail fills the card like owner page .document-preview */
body[data-page="vendor-dokumente"] .document-card-thumbnail {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    background: transparent;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 0;
    margin: 0;
}

body[data-page="vendor-dokumente"] .document-card-thumbnail img {
    position: absolute;
    top: 0;
    left: 2px;
    right: 2px;
    width: calc(100% - 4px);
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 20px 20px 0 0;
}

body[data-page="vendor-dokumente"] .document-card-thumbnail .file-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    color: var(--text-tertiary);
    padding-top: 2em;
}

body[data-page="vendor-dokumente"] .document-card-thumbnail .file-icon svg {
    width: 3em;
    height: 3em;
}

body[data-page="vendor-dokumente"] .file-ext-label {
    font-size: calc(0.75em * var(--font-scale, 1));
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body[data-page="vendor-dokumente"] .document-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    padding: 0.5em 0.75em 0.25em;
}

body[data-page="vendor-dokumente"] .document-card-meta {
    margin-top: auto;
}

body[data-page="vendor-dokumente"] .document-card-name {
    font-size: calc(1em * var(--font-scale, 1));
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

body[data-page="vendor-dokumente"] .document-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.25em 0.75em 0.75em;
}

body[data-page="vendor-dokumente"] .document-type-badge {
    padding: 0.125em 0.5em;
    border-radius: var(--radius-sm);
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-size: calc(0.75em * var(--font-scale, 1));
    font-weight: 500;
}

body[data-page="vendor-dokumente"] .document-status-badge {
    padding: 0.125em 0.5em;
    border-radius: var(--radius-sm);
    font-size: calc(0.75em * var(--font-scale, 1));
    font-weight: 500;
}

body[data-page="vendor-dokumente"] .document-status-badge.pending {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

body[data-page="vendor-dokumente"] .document-status-badge.completed {
    background: var(--ios-system-green);
    color: var(--button-text-on-color);
}

body[data-page="vendor-dokumente"] .document-status-badge.processing {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

body[data-page="vendor-dokumente"] .document-status-badge.failed {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
}

/* ==== Upload Area ==== */
body[data-page="vendor-dokumente"] .vd-upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl) var(--spacing-lg);
    margin: var(--spacing-md) var(--spacing-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-page="vendor-dokumente"] .vd-upload-area:hover,
body[data-page="vendor-dokumente"] .vd-upload-area.drag-over {
    border-color: var(--ios-system-orange);
    background: var(--glass-primary);
}

body[data-page="vendor-dokumente"] .vd-upload-icon {
    font-size: 2.5em;
    color: var(--text-tertiary);
}

/* ==== File List ==== */
body[data-page="vendor-dokumente"] .vd-file-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin: var(--spacing-md) var(--spacing-lg);
    max-height: 12em;
    overflow-y: auto;
}

body[data-page="vendor-dokumente"] .vd-file-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    gap: var(--spacing-sm);
}

body[data-page="vendor-dokumente"] .vd-file-list-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    min-width: 0;
    flex: 1;
}

body[data-page="vendor-dokumente"] .vd-file-list-info span:first-of-type {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="vendor-dokumente"] .vd-file-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 0.25em;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease;
    flex-shrink: 0;
}

body[data-page="vendor-dokumente"] .vd-file-remove-btn:hover {
    color: var(--ios-system-red);
}

/* ==== Upload Options ==== */
body[data-page="vendor-dokumente"] .vd-upload-options {
    margin: var(--spacing-sm) var(--spacing-lg);
}

body[data-page="vendor-dokumente"] .vd-select {
    padding: 0.5em 1em;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-size: calc(0.875em * var(--font-scale, 1));
}

/* ==== Progress Bar ==== */
body[data-page="vendor-dokumente"] .vd-progress-bar {
    height: 0.5em;
    background: var(--glass-secondary);
    border-radius: 0.25em;
    overflow: hidden;
    margin: var(--spacing-md) var(--spacing-lg);
}

body[data-page="vendor-dokumente"] .vd-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--ios-system-orange) 0%, #fb923c 100%);
    transition: width 0.3s ease;
    border-radius: 0.25em;
}

/* ==== Filter Modal ==== */
body[data-page="vendor-dokumente"] .vd-filter-modal-content {
    max-width: 32em;
    padding: var(--spacing-lg);
}

body[data-page="vendor-dokumente"] .vd-filter-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    padding: var(--spacing-md) 0 0;
}

body[data-page="vendor-dokumente"] .vd-filter-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

body[data-page="vendor-dokumente"] .vd-filter-section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-primary);
    font-size: calc(0.9375em * var(--font-scale, 1));
    font-weight: 600;
}

body[data-page="vendor-dokumente"] .vd-filter-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xs);
}

body[data-page="vendor-dokumente"] .vd-filter-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.375em 0.5em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: calc(0.875em * var(--font-scale, 1));
    transition: background 0.15s ease;
}

body[data-page="vendor-dokumente"] .vd-filter-option:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-dokumente"] .vd-filter-option input[type="checkbox"] {
    accent-color: var(--ios-system-orange);
}

/* ==== Date Range ==== */
body[data-page="vendor-dokumente"] .vd-date-range {
    display: flex;
    gap: var(--spacing-md);
}

body[data-page="vendor-dokumente"] .vd-date-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

body[data-page="vendor-dokumente"] .vd-date-input {
    padding: 0.5em 0.75em;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-size: calc(0.875em * var(--font-scale, 1));
}

/* ==== Viewer Modal (Two-Column) ==== */
body[data-page="vendor-dokumente"] .vd-viewer-content {
    max-width: 60em;
    width: 90vw;
    height: 85vh;
    max-height: 85vh;
    padding: 0;
    display: flex;
    flex-direction: column;
}

body[data-page="vendor-dokumente"] .vd-viewer-content .modal-header {
    padding: 1.25em 1.5em;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

body[data-page="vendor-dokumente"] .vd-viewer-split {
    flex: 1;
    display: flex;
    overflow: hidden;
}

body[data-page="vendor-dokumente"] .vd-viewer-left {
    width: 40%;
    min-width: 18.75em;
    border-right: 1px solid var(--glass-border);
    overflow-y: auto;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

body[data-page="vendor-dokumente"] .vd-viewer-right {
    width: 60%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body[data-page="vendor-dokumente"] .vd-viewer-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

body[data-page="vendor-dokumente"] .vd-viewer-preview-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: var(--glass-secondary);
}

body[data-page="vendor-dokumente"] .vd-preview-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body[data-page="vendor-dokumente"] .vd-preview-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

body[data-page="vendor-dokumente"] .vd-preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl);
    color: var(--text-tertiary);
}

body[data-page="vendor-dokumente"] .vd-preview-loading i {
    font-size: 3em;
}

/* ==== Viewer Sections ==== */
body[data-page="vendor-dokumente"] .vd-viewer-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* Section separator — border-top on siblings mirrors owner .viewer-section border-bottom */
body[data-page="vendor-dokumente"] .vd-viewer-section + .vd-viewer-section {
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--glass-border);
}

/* Section header (title + badge in one row) — mirrors owner .viewer-section-header */
body[data-page="vendor-dokumente"] .vd-viewer-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

body[data-page="vendor-dokumente"] .vd-viewer-section-title {
    font-size: calc(0.8125em * var(--font-scale, 1));
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* Financial status badge — mirrors owner .financial-status-badge */
body[data-page="vendor-dokumente"] .vd-financial-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.125em 0.5em;
    border-radius: 1em;
    font-size: calc(0.7em * var(--font-scale, 1));
    font-weight: 600;
    line-height: 1.4;
}

body[data-page="vendor-dokumente"] .vd-financial-badge.status-linked {
    background: var(--accent-success);
    color: var(--button-text-on-color);
}

body[data-page="vendor-dokumente"] .vd-financial-badge.status-unlinked {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
    border: 1px solid var(--glass-border);
}

body[data-page="vendor-dokumente"] .vd-financial-badge.status-checking {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
    border: 1px solid var(--glass-border);
}

/* Financial detail rows */
body[data-page="vendor-dokumente"] .vd-financial-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

/* Placeholder text for empty/loading sections */
body[data-page="vendor-dokumente"] .vd-viewer-placeholder {
    color: var(--text-tertiary);
    font-size: calc(0.875em * var(--font-scale, 1));
}

body[data-page="vendor-dokumente"] .vd-viewer-detail-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

body[data-page="vendor-dokumente"] .vd-viewer-detail-row {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-sm);
    font-size: calc(0.875em * var(--font-scale, 1));
}

body[data-page="vendor-dokumente"] .vd-viewer-detail-label {
    color: var(--text-tertiary);
    white-space: nowrap;
}

body[data-page="vendor-dokumente"] .vd-viewer-detail-value {
    color: var(--text-primary);
    text-align: right;
    word-break: break-word;
}

/* ==== Viewer Footer ==== */
body[data-page="vendor-dokumente"] .vd-viewer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

/* ==== Danger Button ==== */
body[data-page="vendor-dokumente"] .vd-btn-danger {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
    border: none;
}

body[data-page="vendor-dokumente"] .vd-btn-danger:hover {
    opacity: 0.9;
}

/* ==== Type Chip ==== */
body[data-page="vendor-dokumente"] .vd-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.125em 0.5em;
    border-radius: 1em;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-size: calc(0.75em * var(--font-scale, 1));
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s ease;
    line-height: 1.4;
    white-space: nowrap;
}

body[data-page="vendor-dokumente"] .vd-type-chip:hover {
    opacity: 0.85;
}

body[data-page="vendor-dokumente"] .vd-type-chip-icon {
    opacity: 0.7;
    font-size: 0.85em;
}

body[data-page="vendor-dokumente"] .vd-type-chip-icon svg {
    width: 0.85em;
    height: 0.85em;
}

body[data-page="vendor-dokumente"] .vd-type-edit {
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    border: 1px solid var(--ios-system-orange);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-size: calc(0.8125em * var(--font-scale, 1));
    max-width: 10em;
    text-align: right;
}

body[data-page="vendor-dokumente"] .vd-type-edit:focus {
    outline: none;
}

/* ==== Save PDF Steps ==== */
body[data-page="vendor-dokumente"] .vd-save-steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

body[data-page="vendor-dokumente"] .vd-save-step {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

body[data-page="vendor-dokumente"] .vd-save-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75em;
    height: 1.75em;
    border-radius: 50%;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-size: calc(0.8125em * var(--font-scale, 1));
    font-weight: 700;
    flex-shrink: 0;
}

/* ==== Delete Modal ==== */
body[data-page="vendor-dokumente"] .vd-delete-modal-content {
    max-width: 28em;
}

body[data-page="vendor-dokumente"] .vd-delete-doc-name {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875em;
    margin-bottom: var(--spacing-md);
    word-break: break-word;
}

/* ==== Toast Notification ==== */
body[data-page="vendor-dokumente"] .vd-toast {
    position: fixed;
    bottom: 2em;
    right: 2em;
    background: var(--glass-secondary);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: var(--text-primary);
    padding: 0.75em 1.25em;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0.625em 1.5625em rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.625em;
    transform: translateX(25em);
    transition: transform 0.3s ease;
    z-index: 10001;
    max-width: 22em;
    font-size: calc(0.875em * var(--font-scale, 1));
}

body[data-page="vendor-dokumente"] .vd-toast.show {
    transform: translateX(0);
}

body[data-page="vendor-dokumente"] .vd-toast.success {
    border-left: 0.25em solid var(--ios-system-green);
}

body[data-page="vendor-dokumente"] .vd-toast.error {
    border-left: 0.25em solid var(--ios-system-red);
}

body[data-page="vendor-dokumente"] .vd-toast.info {
    border-left: 0.25em solid var(--ios-system-orange);
}

body[data-page="vendor-dokumente"] .vd-toast.warning {
    border-left: 0.25em solid #f59e0b;
}

body[data-page="vendor-dokumente"] .vd-toast-icon {
    font-size: 1.125em;
    flex-shrink: 0;
}

body[data-page="vendor-dokumente"] .vd-toast.success .vd-toast-icon {
    color: var(--ios-system-green);
}

body[data-page="vendor-dokumente"] .vd-toast.error .vd-toast-icon {
    color: var(--ios-system-red);
}

body[data-page="vendor-dokumente"] .vd-toast.info .vd-toast-icon {
    color: var(--ios-system-orange);
}

body[data-page="vendor-dokumente"] .vd-toast.warning .vd-toast-icon {
    color: #f59e0b;
}

/* ==== Pagination ==== */
body[data-page="vendor-dokumente"] .vd-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5em;
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

body[data-page="vendor-dokumente"] .vd-pagination.hidden {
    display: none;
}

body[data-page="vendor-dokumente"] .vd-pagination-page-size {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

body[data-page="vendor-dokumente"] .vd-pagination-select {
    padding: 0.25em 0.5em;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--glass-secondary);
    color: var(--text-primary);
    font-size: calc(0.8125em * var(--font-scale, 1));
}

body[data-page="vendor-dokumente"] .vd-pagination-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

body[data-page="vendor-dokumente"] .vd-pagination-info {
    white-space: nowrap;
}

/* ==== AI Badge ==== */
body[data-page="vendor-dokumente"] .vd-ai-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125em 0.4em;
    border-radius: 1em;
    background: var(--ios-system-blue);
    color: var(--button-text-on-color);
    font-size: calc(0.7em * var(--font-scale, 1));
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.4;
}

/* ==== Tag Pills (Card + Viewer) ==== */
body[data-page="vendor-dokumente"] .document-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em;
    padding: 0 0.75em 0.25em;
}

body[data-page="vendor-dokumente"] .vd-tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1em 0.4em;
    border-radius: 1em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: calc(0.7em * var(--font-scale, 1));
    line-height: 1.4;
    white-space: nowrap;
}

body[data-page="vendor-dokumente"] .vd-tag-overflow {
    background: var(--glass-hover);
    color: var(--text-tertiary);
}

body[data-page="vendor-dokumente"] .document-card-badges-left {
    display: flex;
    align-items: center;
    gap: 0.25em;
}

/* ==== Viewer Tags ==== */
body[data-page="vendor-dokumente"] .vd-viewer-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375em;
}

/* ==== Empty State ==== */
body[data-page="vendor-dokumente"] .empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-tertiary);
}

body[data-page="vendor-dokumente"] .empty-state .empty-icon {
    font-size: 3em;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

/* ==== Responsive ==== */
@media (max-width: 48em) {
    body[data-page="vendor-dokumente"] .vd-header {
        flex-direction: column;
        align-items: stretch;
    }

    body[data-page="vendor-dokumente"] .vd-header-right {
        flex-direction: column;
    }

    body[data-page="vendor-dokumente"] .vd-search-input {
        width: 100%;
        min-width: 0;
    }

    body[data-page="vendor-dokumente"] .documents-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-page="vendor-dokumente"] .vd-viewer-split {
        flex-direction: column;
    }

    body[data-page="vendor-dokumente"] .vd-viewer-left {
        width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        max-height: 40vh;
    }

    body[data-page="vendor-dokumente"] .vd-viewer-right {
        width: 100%;
    }

    body[data-page="vendor-dokumente"] .vd-viewer-content {
        width: 95vw;
        height: 90vh;
    }

    body[data-page="vendor-dokumente"] .vd-filter-checkboxes {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-dokumente"] .vd-pagination {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    body[data-page="vendor-dokumente"] .vd-viewer-footer {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 30em) {
    body[data-page="vendor-dokumente"] .vendor-page-container {
        padding: var(--spacing-sm);
    }

    body[data-page="vendor-dokumente"] .vd-header {
        padding: var(--spacing-sm);
    }

    body[data-page="vendor-dokumente"] .vd-date-range {
        flex-direction: column;
    }
}

/**
 * @file vendor-finanzen.css
 * @filepath public/css/pages/vendor-finanzen.css
 * @description Styles for vendor finances page (8 tabs: Pruefen, Buchungen, Kontoabgleich, Erfassen, Berichte, Abschluss, Kontenplan, Personalbuchhaltung). Matches finanzen.css quality with icon-based tabs, review tables, split-view reconciliation, upload hero, report cards, compliance management, and personnel cost dashboard.
 * @created 2026-02-10
 * @modified 2026-03-07 - Source chips, editable review inputs, type toggle button
 * @modified 2026-03-15 - Report filter bar, report table styling, Personalkosten layout fixes
 * Scoped via body[data-page="vendor-finanzen"]
 */

/* ========================================
   PAGE LAYOUT
   ======================================== */

body[data-page="vendor-finanzen"] .vendor-page-container {
    max-width: 87.5em;
    margin: 0 auto;
    padding: var(--spacing-lg) 2em;
}

/* Lightmodern: frost the entire content area so text is readable over textured bg */
[data-theme="lightmodern"] body[data-page="vendor-finanzen"] .vendor-page-container,
body[data-theme="lightmodern"][data-page="vendor-finanzen"] .vendor-page-container {
    background: var(--glass-primary);
    backdrop-filter: var(--glass-blur) saturate(180%);
    -webkit-backdrop-filter: var(--glass-blur) saturate(180%);
    border-radius: var(--radius-lg);
    margin-top: var(--spacing-md);
}

/* ========================================
   PAGE HEADER
   ======================================== */

body[data-page="vendor-finanzen"] .finanzen-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: 1.5em;
    flex-wrap: wrap;
}

body[data-page="vendor-finanzen"] .header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

body[data-page="vendor-finanzen"] .back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5em;
    height: 2.5em;
    border-radius: var(--radius-md);
    background: var(--glass-primary);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    text-decoration: none;
}

body[data-page="vendor-finanzen"] .back-link:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .header-controls {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

body[data-page="vendor-finanzen"] .period-select {
    padding: 0.375em 0.75em;
    border: none;
    background: var(--glass-secondary);
    color: var(--text-primary);
    font-size: 0.8125em;
    border-radius: 0.375em;
    cursor: pointer;
}

/* ========================================
   ICON-BASED TAB NAVIGATION
   (Matches finanzen.html pattern)
   ======================================== */

body[data-page="vendor-finanzen"] .finanzen-nav {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1.5em;
    padding: 0.25em;
    background: var(--glass-secondary);
    border-radius: 0.75em;
    overflow-x: auto;
}

body[data-page="vendor-finanzen"] .finanzen-nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.75em 1em;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.5em;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: var(--font-sans);
    font-size: 0.875em;
}

body[data-page="vendor-finanzen"] .finanzen-nav-tab:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .finanzen-nav-tab.active {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .finanzen-nav-tab .nav-icon {
    display: flex;
    opacity: 0.7;
}

body[data-page="vendor-finanzen"] .finanzen-nav-tab.active .nav-icon {
    opacity: 1;
}

body[data-page="vendor-finanzen"] .finanzen-nav-tab .nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25em;
    height: 1.25em;
    padding: 0 0.375em;
    font-size: 0.6875em;
    font-weight: 600;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border-radius: 999px;
}

body[data-page="vendor-finanzen"] .finanzen-nav-tab .nav-badge:empty,
body[data-page="vendor-finanzen"] .finanzen-nav-tab .nav-badge[data-count="0"] {
    display: none;
}

/* Nav tabs - Light themes */
[data-theme="light"] body[data-page="vendor-finanzen"] .finanzen-nav-tab,
body[data-theme="light"][data-page="vendor-finanzen"] .finanzen-nav-tab,
[data-theme="lightmodern"] body[data-page="vendor-finanzen"] .finanzen-nav-tab,
body[data-theme="lightmodern"][data-page="vendor-finanzen"] .finanzen-nav-tab {
    color: rgba(0, 0, 0, 0.55);
}

[data-theme="light"] body[data-page="vendor-finanzen"] .finanzen-nav-tab:hover,
body[data-theme="light"][data-page="vendor-finanzen"] .finanzen-nav-tab:hover,
[data-theme="lightmodern"] body[data-page="vendor-finanzen"] .finanzen-nav-tab:hover,
body[data-theme="lightmodern"][data-page="vendor-finanzen"] .finanzen-nav-tab:hover {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.8);
}

[data-theme="light"] body[data-page="vendor-finanzen"] .finanzen-nav-tab.active,
body[data-theme="light"][data-page="vendor-finanzen"] .finanzen-nav-tab.active,
[data-theme="lightmodern"] body[data-page="vendor-finanzen"] .finanzen-nav-tab.active,
body[data-theme="lightmodern"][data-page="vendor-finanzen"] .finanzen-nav-tab.active {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.9);
}

/* Mobile: hide labels, show icons only */
@media (max-width: 40em) {
    body[data-page="vendor-finanzen"] .finanzen-nav-tab .nav-label {
        display: none;
    }

    body[data-page="vendor-finanzen"] .finanzen-nav-tab {
        padding: 0.75em;
    }
}

/* ========================================
   TAB CONTENT
   ======================================== */

body[data-page="vendor-finanzen"] .finanzen-tab-content {
    display: none;
}

body[data-page="vendor-finanzen"] .finanzen-tab-content.active {
    display: block;
}

/* ========================================
   REVIEW QUEUE TAB (Tab 1)
   ======================================== */

body[data-page="vendor-finanzen"] .review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1em;
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .review-queue {
    min-height: 12.5em;
}

body[data-page="vendor-finanzen"] .review-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4em 2em;
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, rgba(52, 199, 89, 0.03) 100%);
    border-radius: 1em;
    margin: 1em;
}

body[data-page="vendor-finanzen"] .review-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4em;
    height: 4em;
    margin-bottom: 1.25em;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.15) 0%, rgba(48, 209, 88, 0.1) 100%);
    border: 2px solid rgba(52, 199, 89, 0.2);
}

body[data-page="vendor-finanzen"] .review-empty-icon svg {
    width: 1.75em;
    height: 1.75em;
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .review-empty-icon .animate-spin {
    animation: vf-spin 1.5s linear infinite;
    color: var(--ios-system-orange);
}

@keyframes vf-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body[data-page="vendor-finanzen"] .review-empty p {
    font-size: 1em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

/* Batch Actions */
body[data-page="vendor-finanzen"] .batch-actions {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

body[data-page="vendor-finanzen"] .batch-count {
    font-size: 0.8125em;
    color: var(--text-secondary);
    font-weight: 500;
}

body[data-page="vendor-finanzen"] .btn-batch {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 0.75em;
    border: none;
    border-radius: 0.375em;
    cursor: pointer;
    font-size: 0.8125em;
    font-weight: 500;
    font-family: var(--font-sans);
    transition: all 0.15s;
}

body[data-page="vendor-finanzen"] .btn-batch-approve {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .btn-batch-approve:hover {
    background: rgba(52, 199, 89, 0.25);
}

body[data-page="vendor-finanzen"] .btn-batch-reject {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

body[data-page="vendor-finanzen"] .btn-batch-reject:hover {
    background: rgba(255, 59, 48, 0.25);
}

/* ==== Review Cards Layout ==== */
body[data-page="vendor-finanzen"] .review-cards-container {
    padding: 0.75em;
}

body[data-page="vendor-finanzen"] .review-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 0.5em 0.75em;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0.75em;
}

body[data-page="vendor-finanzen"] .review-select-all {
    display: flex;
    align-items: center;
    gap: 0.5em;
    cursor: pointer;
}

body[data-page="vendor-finanzen"] .review-sort-controls {
    display: flex;
    align-items: center;
    gap: 0.375em;
}

body[data-page="vendor-finanzen"] .review-sort-select {
    padding: 0.3em 0.5em;
    border-radius: 0.375em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-secondary);
    font-size: 0.75em;
    font-family: var(--font-sans);
    cursor: pointer;
}

body[data-page="vendor-finanzen"] .review-sort-dir {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75em;
    height: 1.75em;
    border-radius: 0.375em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: transform 0.2s ease, color 0.15s ease;
}

body[data-page="vendor-finanzen"] .review-sort-dir:hover {
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .review-sort-dir.sort-desc {
    transform: rotate(180deg);
}

body[data-page="vendor-finanzen"] .review-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

/* --- Individual Review Card --- */
body[data-page="vendor-finanzen"] .review-card {
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    background: var(--glass-primary);
    padding: 0.875em 1em;
    transition: border-color 0.15s ease, background 0.15s ease;
}

body[data-page="vendor-finanzen"] .review-card:hover {
    border-color: var(--accent-primary, var(--ios-system-blue));
    background: var(--glass-hover);
}

/* Clickable header */
body[data-page="vendor-finanzen"] .review-card-header {
    cursor: pointer;
}

/* Collapsible body */
body[data-page="vendor-finanzen"] .review-card-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
}

body[data-page="vendor-finanzen"] .review-card-body-inner {
    overflow: hidden;
}

body[data-page="vendor-finanzen"] .review-card.expanded .review-card-body {
    grid-template-rows: 1fr;
}

/* Chevron rotation */
body[data-page="vendor-finanzen"] .review-card-chevron {
    color: var(--text-tertiary);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

body[data-page="vendor-finanzen"] .review-card.expanded .review-card-chevron {
    transform: rotate(180deg);
}

/* Card top row: checkbox + chips + actions */
body[data-page="vendor-finanzen"] .review-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.625em;
}

body[data-page="vendor-finanzen"] .review-card-left {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="vendor-finanzen"] .review-card-actions {
    display: flex;
    gap: 0.375em;
}

body[data-page="vendor-finanzen"] .review-card .btn-review {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    padding: 0;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

body[data-page="vendor-finanzen"] .review-card .btn-review.btn-approve {
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .review-card .btn-review.btn-approve:hover {
    background: rgba(52, 199, 89, 0.15);
    border-color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .review-card .btn-review.btn-reject {
    color: var(--ios-system-red);
    background: transparent;
}

body[data-page="vendor-finanzen"] .review-card .btn-review.btn-reject:hover {
    background: rgba(255, 59, 48, 0.15);
    border-color: var(--ios-system-red);
}

/* Card main row: description + amount */
body[data-page="vendor-finanzen"] .review-card-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    margin-bottom: 0.625em;
}

body[data-page="vendor-finanzen"] .review-card-desc {
    flex: 1;
    min-width: 0;
    font-size: 0.9375em;
    color: var(--text-primary);
    font-weight: 500;
}

body[data-page="vendor-finanzen"] .review-card-desc {
    display: flex;
    flex-direction: column;
    gap: 0.125em;
}

body[data-page="vendor-finanzen"] .review-card-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

body[data-page="vendor-finanzen"] .review-card-subtitle {
    font-size: 0.75em;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    font-weight: 400;
}

/* Editable description row at card bottom */
body[data-page="vendor-finanzen"] .review-card-edit-row {
    display: flex;
    flex-direction: column;
    gap: 0.1875em;
    padding-top: 0.625em;
    border-top: 1px solid var(--glass-border);
    margin-top: 0.625em;
}

body[data-page="vendor-finanzen"] textarea.review-edit-textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 3em;
    line-height: 1.4;
}

body[data-page="vendor-finanzen"] .review-card-right {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-shrink: 0;
}

body[data-page="vendor-finanzen"] .review-card-amount {
    font-size: 1.0625em;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body[data-page="vendor-finanzen"] .review-card-amount.amount-income {
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .review-card-amount.amount-expense {
    color: var(--text-primary);
}

/* Card details grid */
body[data-page="vendor-finanzen"] .review-card-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625em 1.25em;
    padding-top: 0.75em;
    margin-top: 0.5em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .review-detail {
    display: flex;
    flex-direction: column;
    gap: 0.1875em;
    min-width: 0;
}

body[data-page="vendor-finanzen"] .review-detail-label {
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body[data-page="vendor-finanzen"] .review-detail-doc {
    grid-column: span 3;
}

body[data-page="vendor-finanzen"] .review-doc-link {
    font-size: 0.8125em;
    color: var(--accent-primary);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

body[data-page="vendor-finanzen"] .review-doc-link:hover {
    text-decoration: underline;
}

body[data-page="vendor-finanzen"] .review-konto-label {
    font-size: 0.8125em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Account select dropdowns in review cards */
body[data-page="vendor-finanzen"] .review-edit-select {
    width: 100%;
    min-width: 0;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5em center;
    padding-right: 1.5em;
}

/* Confidence Badge */
body[data-page="vendor-finanzen"] .confidence-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875em;
    padding: 0.125em 0.5em;
    border-radius: 999px;
    font-weight: 600;
}

body[data-page="vendor-finanzen"] .confidence-badge.high {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .confidence-badge.medium {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="vendor-finanzen"] .confidence-badge.low {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

/* ==== Source Chips ==== */
body[data-page="vendor-finanzen"] .review-source-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.125em 0.5em;
    border-radius: 999px;
    font-size: calc(0.6875em * var(--font-scale, 1));
    font-weight: 600;
    white-space: nowrap;
}

body[data-page="vendor-finanzen"] .source-chip-ocr {
    background: rgba(0, 122, 255, 0.15);
    color: var(--ios-system-blue);
}

body[data-page="vendor-finanzen"] .source-chip-job {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .source-chip-purchase {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

/* ==== Editable Review Inputs ==== */
body[data-page="vendor-finanzen"] .review-edit-input {
    padding: 0.3em 0.5em;
    border-radius: 0.375em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-size: 0.8125em;
    font-family: var(--font-sans);
    width: 100%;
    min-width: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body[data-page="vendor-finanzen"] .review-edit-input:focus {
    outline: none;
    border-color: var(--ios-system-blue);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.12);
}

body[data-page="vendor-finanzen"] .review-edit-input::placeholder {
    color: var(--text-quaternary);
}

body[data-page="vendor-finanzen"] .review-edit-desc {
    min-width: 0;
}

body[data-page="vendor-finanzen"] .review-edit-num {
    width: 6em;
}

/* ==== Type Toggle Button ==== */
body[data-page="vendor-finanzen"] .review-type-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.2em 0.5em;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: calc(0.75em * var(--font-scale, 1));
    font-weight: 600;
    font-family: var(--font-sans);
    transition: all 0.15s ease;
}

body[data-page="vendor-finanzen"] .type-toggle-income {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .type-toggle-expense {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

body[data-page="vendor-finanzen"] .review-type-toggle:hover {
    opacity: 0.8;
}

/* ==== Responsive: stack cards tighter on small screens ==== */
@media (max-width: 48em) {
    body[data-page="vendor-finanzen"] .review-card-details {
        grid-template-columns: 1fr 1fr;
    }

    body[data-page="vendor-finanzen"] .review-detail-doc {
        grid-column: span 2;
    }
}

@media (max-width: 36em) {
    body[data-page="vendor-finanzen"] .review-card-details {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-finanzen"] .review-card-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25em;
    }

    body[data-page="vendor-finanzen"] .review-card-amount {
        align-self: flex-end;
    }

    body[data-page="vendor-finanzen"] .review-detail-doc {
        grid-column: span 1;
    }
}

/* ========================================
   TRANSACTIONS TAB (Tab 2)
   ======================================== */

/* Inline editable fields in transaction rows */
body[data-page="vendor-finanzen"] .txn-inline-edit {
    display: block;
    box-sizing: border-box;
    padding: 0.2em 0.375em;
    border-radius: 0.25em;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-primary);
    font-size: inherit;
    font-family: var(--font-sans);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    transition: border-color 0.15s ease, background 0.15s ease;
}

body[data-page="vendor-finanzen"] .txn-inline-edit:hover {
    border-color: var(--glass-border);
    background: var(--glass-primary);
}

body[data-page="vendor-finanzen"] .txn-inline-edit:focus {
    outline: none;
    border-color: var(--ios-system-blue);
    background: var(--glass-primary);
}

body[data-page="vendor-finanzen"] .txn-inline-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.375em center;
    padding-right: 1.25em;
}

body[data-page="vendor-finanzen"] .finanzen-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1em;
    margin-bottom: 1.5em;
}

body[data-page="vendor-finanzen"] .summary-card {
    padding: 1.25em;
}

body[data-page="vendor-finanzen"] .summary-label {
    font-size: 0.75em;
    color: var(--text-secondary);
    margin-bottom: 0.25em;
    font-family: var(--font-sans);
}

body[data-page="vendor-finanzen"] .summary-value {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .summary-value.positive {
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .summary-value.negative {
    color: var(--ios-system-red);
}

/* Transactions Header */
body[data-page="vendor-finanzen"] .transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .transactions-filters {
    display: flex;
    align-items: center;
    gap: 0.75em;
    flex-wrap: wrap;
}

body[data-page="vendor-finanzen"] .filter-tabs {
    display: flex;
    padding: 0.125em;
    border-radius: 0.375em;
    background: var(--glass-secondary);
}

body[data-page="vendor-finanzen"] .filter-tab {
    padding: 0.375em 0.75em;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8125em;
    font-family: var(--font-sans);
    border-radius: 0.25em;
    transition: all 0.15s;
}

body[data-page="vendor-finanzen"] .filter-tab:hover {
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .filter-tab.active {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .btn-export {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.75em;
    border: none;
    background: var(--glass-secondary);
    color: var(--text-secondary);
    font-size: 0.8125em;
    font-family: var(--font-sans);
    border-radius: 0.375em;
    cursor: pointer;
    transition: all 0.15s;
}

body[data-page="vendor-finanzen"] .btn-export:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* Transactions Table */
body[data-page="vendor-finanzen"] .transactions-table {
    overflow-x: auto;
    border-radius: 0.75em;
    background: var(--glass-primary);
}

body[data-page="vendor-finanzen"] .table-header {
    display: grid;
    grid-template-columns:
        minmax(5em, 6.5em)
        minmax(10em, 2fr)
        minmax(7em, 1fr)
        minmax(7em, 1fr)
        minmax(7em, 1fr)
        minmax(3em, 3.5em)
        minmax(6em, 8em);
    gap: 1em;
    padding: 0.875em 1.5em;
    background: var(--glass-secondary);
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-sans);
    position: sticky;
    top: 0;
    z-index: 1;
}

body[data-page="vendor-finanzen"] .table-header .col-amount {
    text-align: right;
}

body[data-page="vendor-finanzen"] .table-body {
    max-height: 28em;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

body[data-page="vendor-finanzen"] .table-body::-webkit-scrollbar {
    width: 6px;
}

body[data-page="vendor-finanzen"] .table-body::-webkit-scrollbar-track {
    background: transparent;
}

body[data-page="vendor-finanzen"] .table-body::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

body[data-page="vendor-finanzen"] .table-row {
    display: grid;
    grid-template-columns:
        minmax(5em, 6.5em)
        minmax(10em, 2fr)
        minmax(7em, 1fr)
        minmax(7em, 1fr)
        minmax(7em, 1fr)
        minmax(3em, 3.5em)
        minmax(6em, 8em);
    gap: 1em;
    padding: 0.875em 1.5em;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    align-items: center;
}

body[data-page="vendor-finanzen"] .table-row:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-finanzen"] .table-row:active {
    transform: scale(0.995);
}

body[data-page="vendor-finanzen"] .table-row .col-date {
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

body[data-page="vendor-finanzen"] .table-row .col-desc {
    font-size: 0.875em;
    font-weight: 450;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="vendor-finanzen"] .table-row .col-category,
body[data-page="vendor-finanzen"] .table-row .col-konto,
body[data-page="vendor-finanzen"] .table-row .col-gegenkonto {
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 0;
    overflow: visible;
}

body[data-page="vendor-finanzen"] .table-row .col-mwst {
    display: flex;
    align-items: center;
    justify-content: center;
}

body[data-page="vendor-finanzen"] .table-row .col-amount {
    font-size: 0.875em;
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body[data-page="vendor-finanzen"] .table-row .col-amount.positive {
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .table-row .col-amount.negative {
    color: var(--ios-system-red);
}

/* MwSt Badge */
body[data-page="vendor-finanzen"] .mwst-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    font-size: 0.75em;
    font-weight: 600;
}

body[data-page="vendor-finanzen"] .mwst-badge.mwst-booked {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
    border: 1px solid var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .mwst-badge.mwst-pending {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
    border: 1px solid var(--ios-system-orange);
}

body[data-page="vendor-finanzen"] .mwst-badge.mwst-none {
    background: transparent;
    color: var(--text-quaternary);
    border: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .mwst-badge {
    transition: transform 0.15s ease, opacity 0.15s ease;
}

body[data-page="vendor-finanzen"] .mwst-badge:hover {
    transform: scale(1.1);
}

/* Pagination */
body[data-page="vendor-finanzen"] .transactions-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75em 1.25em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .page-info {
    font-size: 0.8125em;
    color: var(--text-secondary);
}

body[data-page="vendor-finanzen"] .page-buttons {
    display: flex;
    gap: 0.5em;
}

body[data-page="vendor-finanzen"] .btn-page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    border: none;
    background: var(--glass-secondary);
    color: var(--text-secondary);
    border-radius: 0.375em;
    cursor: pointer;
    transition: all 0.15s;
}

body[data-page="vendor-finanzen"] .btn-page:hover:not(:disabled) {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========================================
   RECONCILIATION TAB (Tab 3)
   ======================================== */

body[data-page="vendor-finanzen"] .reconciliation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1em;
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .reconciliation-actions {
    display: flex;
    gap: 0.75em;
    align-items: center;
}

body[data-page="vendor-finanzen"] .btn-import {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 0.75em;
    border: none;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-size: 0.8125em;
    font-family: var(--font-sans);
    font-weight: 500;
    border-radius: 0.375em;
    cursor: pointer;
    transition: opacity 0.15s;
}

body[data-page="vendor-finanzen"] .btn-import:hover {
    opacity: 0.85;
}

body[data-page="vendor-finanzen"] .reconciliation-filters {
    display: flex;
    gap: 1.5em;
    padding: 0.75em 1.25em;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

body[data-page="vendor-finanzen"] .filter-group {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="vendor-finanzen"] .filter-label {
    font-size: 0.75em;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Split View */
body[data-page="vendor-finanzen"] .reconciliation-split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
    min-height: 31.25em;
}

body[data-page="vendor-finanzen"] .bank-entries-panel,
body[data-page="vendor-finanzen"] .matching-panel {
    display: flex;
    flex-direction: column;
    background: var(--glass-secondary);
    border-radius: 0.75em;
    overflow: hidden;
}

body[data-page="vendor-finanzen"] .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875em 1em;
    background: var(--glass-secondary);
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .panel-header h3 {
    margin: 0;
}

body[data-page="vendor-finanzen"] .entry-count {
    font-size: 0.75em;
    color: var(--text-tertiary);
}

body[data-page="vendor-finanzen"] .bank-entries-list {
    flex: 1;
    overflow-y: auto;
    max-height: 28em;
}

body[data-page="vendor-finanzen"] .bank-entry {
    padding: 0.875em 1em;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background 0.15s;
}

body[data-page="vendor-finanzen"] .bank-entry:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-finanzen"] .bank-entry.selected {
    background: var(--glass-hover);
    border-left: 3px solid var(--ios-system-orange);
}

body[data-page="vendor-finanzen"] .bank-entry.matched {
    opacity: 0.6;
}

body[data-page="vendor-finanzen"] .entry-main {
    display: flex;
    align-items: flex-start;
    gap: 1em;
}

body[data-page="vendor-finanzen"] .bank-entry-info {
    display: flex;
    flex-direction: column;
    gap: 0.125em;
    flex: 1;
    min-width: 0;
}

body[data-page="vendor-finanzen"] .bank-entry-desc {
    font-size: 0.875em;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="vendor-finanzen"] .bank-entry-date {
    font-size: 0.75em;
    color: var(--text-tertiary);
    min-width: 5em;
}

body[data-page="vendor-finanzen"] .bank-entry-amount {
    font-size: 0.875em;
    font-weight: 600;
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    text-align: right;
    min-width: 6em;
}

body[data-page="vendor-finanzen"] .bank-entry-amount.expense {
    color: var(--ios-system-red);
}

body[data-page="vendor-finanzen"] .bank-entry-amount.income {
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .entry-status {
    margin-top: 0.5em;
}

body[data-page="vendor-finanzen"] .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-size: 0.6875em;
    padding: 0.125em 0.5em;
    border-radius: 0.25em;
    font-family: var(--font-sans);
}

body[data-page="vendor-finanzen"] .status-badge.matched {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .status-badge.unmatched {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="vendor-finanzen"] .matching-content {
    flex: 1;
    padding: 1em;
    overflow-y: auto;
}

body[data-page="vendor-finanzen"] .matching-placeholder,
body[data-page="vendor-finanzen"] .loading-state,
body[data-page="vendor-finanzen"] .empty-state-recon,
body[data-page="vendor-finanzen"] .error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75em;
    height: 100%;
    min-height: 12.5em;
    text-align: center;
}

body[data-page="vendor-finanzen"] .loading-state .spinner,
body[data-page="vendor-finanzen"] .loading-placeholder .spinner {
    width: 2em;
    height: 2em;
    border: 2px solid var(--glass-border);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: vf-ring 0.8s linear infinite;
}

body[data-page="vendor-finanzen"] .loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3em;
}

/* ========================================
   MANUAL ENTRY / UPLOAD HERO (Tab 4)
   ======================================== */

body[data-page="vendor-finanzen"] .manual-header {
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .manual-form {
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    gap: 1.25em;
}

/* Upload Hero */
body[data-page="vendor-finanzen"] .upload-hero-section {
    margin-bottom: 1.5em;
    padding: 2em 1.5em;
    border: 2px dashed var(--glass-border);
    border-radius: 1em;
    background: linear-gradient(135deg,
        var(--glass-primary) 0%,
        var(--glass-secondary) 100%);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

body[data-page="vendor-finanzen"] .upload-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%,
        rgba(255, 149, 0, 0.08) 0%,
        transparent 70%);
    pointer-events: none;
}

body[data-page="vendor-finanzen"] .upload-hero-section:hover {
    border-color: var(--ios-system-orange);
    background: linear-gradient(135deg,
        var(--glass-secondary) 0%,
        var(--glass-hover) 100%);
    transform: translateY(-2px);
    box-shadow: 0 0.5em 2em rgba(255, 149, 0, 0.15);
}

body[data-page="vendor-finanzen"] .upload-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

body[data-page="vendor-finanzen"] .upload-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5em;
    height: 5em;
    margin-bottom: 1em;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(255, 149, 0, 0.15) 0%,
        rgba(255, 149, 0, 0.08) 100%);
    color: var(--ios-system-orange);
}

body[data-page="vendor-finanzen"] .upload-hero-title {
    font-family: var(--font-serif);
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

body[data-page="vendor-finanzen"] .upload-hero-subtitle {
    font-family: var(--font-sans);
    font-size: 0.9375em;
    color: var(--text-secondary);
    margin-bottom: 1.5em;
    max-width: 20em;
    margin-left: auto;
    margin-right: auto;
}

body[data-page="vendor-finanzen"] .upload-hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.75em;
    flex-wrap: wrap;
    margin-bottom: 1em;
}

body[data-page="vendor-finanzen"] .upload-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.75em 1.25em;
    border-radius: 0.75em;
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
}

body[data-page="vendor-finanzen"] .upload-hero-btn.primary {
    background: linear-gradient(135deg,
        var(--ios-system-orange) 0%,
        #FF7B00 100%);
    color: var(--button-text-on-color);
    box-shadow: 0 0.25em 1em rgba(255, 149, 0, 0.3);
}

body[data-page="vendor-finanzen"] .upload-hero-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.375em 1.5em rgba(255, 149, 0, 0.4);
}

body[data-page="vendor-finanzen"] .upload-hero-btn.secondary {
    background: var(--glass-secondary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .upload-hero-btn.secondary:hover {
    background: var(--glass-hover);
    border-color: var(--ios-system-orange);
    color: var(--ios-system-orange);
}

body[data-page="vendor-finanzen"] .upload-hero-formats {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Processing State */
body[data-page="vendor-finanzen"] .upload-processing-state {
    position: relative;
    z-index: 1;
    padding: 1em 0;
}

body[data-page="vendor-finanzen"] .processing-animation {
    position: relative;
    width: 6.25em;
    height: 6.25em;
    margin: 0 auto 1.5em;
}

body[data-page="vendor-finanzen"] .processing-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--ios-system-orange);
    animation: vf-ring 1.5s linear infinite;
}

body[data-page="vendor-finanzen"] .processing-ring:nth-child(2) {
    inset: 0.625em;
    border-top-color: var(--ios-system-orange);
    animation-duration: 2s;
    animation-direction: reverse;
}

body[data-page="vendor-finanzen"] .processing-ring:nth-child(3) {
    inset: 1.25em;
    border-top-color: var(--ios-system-green);
    animation-duration: 2.5s;
}

@keyframes vf-ring {
    to { transform: rotate(360deg); }
}

@keyframes vf-pulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

body[data-page="vendor-finanzen"] .processing-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--ios-system-orange);
    animation: vf-pulse 2s ease-in-out infinite;
}

body[data-page="vendor-finanzen"] .processing-title {
    font-family: var(--font-serif);
    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

body[data-page="vendor-finanzen"] .processing-subtitle {
    font-family: var(--font-sans);
    font-size: 0.875em;
    color: var(--text-secondary);
    margin-bottom: 1em;
}

body[data-page="vendor-finanzen"] .processing-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 1em;
    background: var(--glass-primary);
    border-radius: 2em;
    margin-bottom: 1.5em;
}

body[data-page="vendor-finanzen"] .timer-text {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--ios-system-orange);
    font-weight: 500;
}

body[data-page="vendor-finanzen"] .processing-steps {
    display: flex;
    justify-content: center;
    gap: 2em;
    flex-wrap: wrap;
}

body[data-page="vendor-finanzen"] .processing-steps .step {
    display: flex;
    align-items: center;
    gap: 0.5em;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

body[data-page="vendor-finanzen"] .processing-steps .step.active {
    opacity: 1;
}

body[data-page="vendor-finanzen"] .processing-steps .step.completed {
    opacity: 0.7;
}

body[data-page="vendor-finanzen"] .step-dot {
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background: var(--text-tertiary);
    transition: all 0.3s ease;
}

body[data-page="vendor-finanzen"] .step.active .step-dot {
    background: var(--ios-system-orange);
    box-shadow: 0 0 0.5em rgba(255, 149, 0, 0.5);
    animation: vf-dotPulse 1s ease-in-out infinite;
}

body[data-page="vendor-finanzen"] .step.completed .step-dot {
    background: var(--ios-system-green);
}

@keyframes vf-dotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

body[data-page="vendor-finanzen"] .step-text {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-secondary);
}

body[data-page="vendor-finanzen"] .step.active .step-text {
    color: var(--text-primary);
    font-weight: 500;
}

/* Completed State */
body[data-page="vendor-finanzen"] .upload-completed-state {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    padding: 1em;
    background: linear-gradient(135deg,
        rgba(52, 199, 89, 0.1) 0%,
        rgba(52, 199, 89, 0.05) 100%);
    border-radius: 0.75em;
}

body[data-page="vendor-finanzen"] .completed-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3em;
    height: 3em;
    border-radius: 50%;
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
    flex-shrink: 0;
}

body[data-page="vendor-finanzen"] .completed-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

body[data-page="vendor-finanzen"] .completed-filename {
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

body[data-page="vendor-finanzen"] .completed-status {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .completed-change-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

body[data-page="vendor-finanzen"] .completed-change-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* Form Rows */
body[data-page="vendor-finanzen"] .form-row {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="vendor-finanzen"] .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}

body[data-page="vendor-finanzen"] .form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1em;
}

body[data-page="vendor-finanzen"] .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

body[data-page="vendor-finanzen"] .form-field label {
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-secondary);
}

body[data-page="vendor-finanzen"] .form-field input,
body[data-page="vendor-finanzen"] .form-field select,
body[data-page="vendor-finanzen"] .form-field textarea {
    padding: 0.5em 0.75em;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-size: 0.875em;
    font-family: inherit;
}

body[data-page="vendor-finanzen"] .form-hint {
    font-size: 0.6875em;
}

/* Form Divider */
body[data-page="vendor-finanzen"] .form-divider {
    display: flex;
    align-items: center;
    gap: 1em;
    color: var(--text-tertiary);
}

body[data-page="vendor-finanzen"] .form-divider::before,
body[data-page="vendor-finanzen"] .form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

body[data-page="vendor-finanzen"] .divider-text {
    font-size: 0.75em;
    white-space: nowrap;
}

/* Type Selector */
body[data-page="vendor-finanzen"] .type-selector {
    display: flex;
    gap: 0.5em;
}

body[data-page="vendor-finanzen"] .type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.75em;
    border: 2px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 0.5em;
    cursor: pointer;
    font-size: 0.875em;
    font-weight: 500;
    font-family: var(--font-sans);
    transition: all 0.2s;
}

body[data-page="vendor-finanzen"] .type-btn:hover {
    border-color: var(--text-tertiary);
}

body[data-page="vendor-finanzen"] .type-btn.active[data-type="expense"] {
    border-color: var(--ios-system-red);
    color: var(--ios-system-red);
    background: rgba(255, 59, 48, 0.08);
}

body[data-page="vendor-finanzen"] .type-btn.active[data-type="income"] {
    border-color: var(--ios-system-green);
    color: var(--ios-system-green);
    background: rgba(52, 199, 89, 0.08);
}

/* Amount Input */
body[data-page="vendor-finanzen"] .amount-input {
    display: flex;
    gap: 0.5em;
}

body[data-page="vendor-finanzen"] .currency-select {
    width: 5em;
    padding: 0.5em;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-secondary);
    color: var(--text-primary);
    font-size: 0.875em;
}

body[data-page="vendor-finanzen"] .amount-input input {
    flex: 1;
}

/* MwSt Display */
body[data-page="vendor-finanzen"] .mwst-calculated-display {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 0.875em;
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .mwst-rate-badge {
    font-size: 0.6875em;
    padding: 0.125em 0.375em;
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
    border-radius: 999px;
    font-weight: 600;
}

/* Form Actions */
body[data-page="vendor-finanzen"] .form-actions {
    display: flex;
    gap: 0.75em;
    justify-content: flex-end;
    padding-top: 0.5em;
}

body[data-page="vendor-finanzen"] .btn-primary {
    padding: 0.625em 1.5em;
    border: none;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-size: 0.875em;
    font-weight: 500;
    font-family: var(--font-sans);
    border-radius: 0.5em;
    cursor: pointer;
    transition: opacity 0.15s;
}

body[data-page="vendor-finanzen"] .btn-primary:hover {
    opacity: 0.85;
}

body[data-page="vendor-finanzen"] .btn-secondary {
    padding: 0.625em 1.5em;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875em;
    font-weight: 500;
    font-family: var(--font-sans);
    border-radius: 0.5em;
    cursor: pointer;
    transition: all 0.15s;
}

body[data-page="vendor-finanzen"] .btn-secondary:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* ========================================
   REPORTS TAB (Tab 5)
   ======================================== */

body[data-page="vendor-finanzen"] .reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
    gap: 1em;
}

body[data-page="vendor-finanzen"] .report-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2em 1.5em;
    cursor: pointer;
    transition: all 0.2s;
    gap: 0.75em;
}

body[data-page="vendor-finanzen"] .report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body[data-page="vendor-finanzen"] .report-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4em;
    height: 4em;
    border-radius: 1em;
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.12) 0%, rgba(255, 59, 48, 0.08) 100%);
    color: var(--ios-system-orange);
}

/* ========================================
   COMPLIANCE TAB (Tab 6)
   ======================================== */

body[data-page="vendor-finanzen"] .compliance-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1em;
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .period-type-tabs {
    display: flex;
    padding: 0.125em;
    border-radius: 0.375em;
    background: var(--glass-secondary);
}

body[data-page="vendor-finanzen"] .period-type-tab {
    padding: 0.375em 0.75em;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8125em;
    font-family: var(--font-sans);
    border-radius: 0.25em;
    transition: all 0.15s;
}

body[data-page="vendor-finanzen"] .period-type-tab.active {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .compliance-actions {
    display: flex;
    gap: 0.5em;
    align-items: center;
    flex-wrap: wrap;
}

body[data-page="vendor-finanzen"] .compliance-table {
    overflow-x: auto;
}

body[data-page="vendor-finanzen"] .periods-table {
    width: 100%;
    border-collapse: collapse;
}

body[data-page="vendor-finanzen"] .periods-table th {
    text-align: left;
    padding: 0.75em 1em;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-secondary);
}

body[data-page="vendor-finanzen"] .periods-table td {
    padding: 0.75em 1em;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.875em;
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .periods-table tr:hover {
    background: var(--glass-hover);
}

/* Period Status Badges */
body[data-page="vendor-finanzen"] .period-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.25em 0.625em;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: 500;
}

body[data-page="vendor-finanzen"] .period-status.open {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .period-status.closed {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="vendor-finanzen"] .period-status.locked {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

/* ========================================
   KONTENPLAN TAB (Tab 7)
   ======================================== */

body[data-page="vendor-finanzen"] .kontenplan-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .geschaeftsjahr-selector {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="vendor-finanzen"] .geschaeftsjahr-select-wrapper {
    display: flex;
    gap: 0.25em;
    align-items: center;
}

body[data-page="vendor-finanzen"] .bilanz-view-toggle {
    display: flex;
    padding: 0.125em;
    border-radius: 0.375em;
    background: var(--glass-secondary);
}

body[data-page="vendor-finanzen"] .bilanz-view-toggle button {
    padding: 0.375em 0.75em;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8125em;
    font-family: var(--font-sans);
    border-radius: 0.25em;
    transition: all 0.15s;
}

body[data-page="vendor-finanzen"] .bilanz-view-toggle button.active {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .bilanz-container {
    padding: 1em;
}

body[data-page="vendor-finanzen"] .bilanz-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3em;
}

body[data-page="vendor-finanzen"] .loading-spinner {
    width: 2em;
    height: 2em;
    border: 2px solid var(--glass-border);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: vf-spin 0.8s linear infinite;
}

body[data-page="vendor-finanzen"] .kontenplan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1em;
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .kontenplan-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

body[data-page="vendor-finanzen"] .kontenplan-title-row {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

body[data-page="vendor-finanzen"] .kontenplan-standard-badge {
    font-size: 0.6875em;
    padding: 0.125em 0.5em;
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
    border-radius: 999px;
    font-weight: 500;
}

body[data-page="vendor-finanzen"] .kontenplan-header-right {
    display: flex;
    gap: 0.75em;
    align-items: center;
}

body[data-page="vendor-finanzen"] .kontenplan-search input,
body[data-page="vendor-finanzen"] .filter-search {
    padding: 0.5em 0.75em;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-size: 0.875em;
}

body[data-page="vendor-finanzen"] .kontenplan-tree {
    display: flex;
    flex-direction: column;
    gap: 0.125em;
    padding: 0.5em;
}

body[data-page="vendor-finanzen"] .kontenplan-klasse {
    margin-bottom: var(--spacing-sm);
}

body[data-page="vendor-finanzen"] .kontenplan-klasse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75em var(--spacing-md);
    background: var(--glass-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .kontenplan-klasse-header:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-finanzen"] .kontenplan-accounts {
    padding-left: var(--spacing-md);
}

body[data-page="vendor-finanzen"] .kontenplan-account {
    display: grid;
    grid-template-columns: 5em 1fr auto auto;
    gap: var(--spacing-md);
    padding: 0.5em var(--spacing-sm);
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background 0.15s ease;
}

body[data-page="vendor-finanzen"] .kontenplan-account:hover {
    background: var(--glass-primary);
}

body[data-page="vendor-finanzen"] .kontenplan-account.vendor-custom {
    border-left: 3px solid var(--ios-system-orange);
    padding-left: calc(var(--spacing-sm) - 3px);
}

body[data-page="vendor-finanzen"] .konto-nummer {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875em;
}

body[data-page="vendor-finanzen"] .konto-name {
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .konto-balance {
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

body[data-page="vendor-finanzen"] .konto-type {
    color: var(--text-tertiary);
    font-size: 0.75em;
}

/* Framework Selector */
body[data-page="vendor-finanzen"] .framework-selector {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin: var(--spacing-md);
}

body[data-page="vendor-finanzen"] .framework-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12em, 1fr));
    gap: var(--spacing-sm);
}

body[data-page="vendor-finanzen"] .framework-option {
    padding: var(--spacing-md);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

body[data-page="vendor-finanzen"] .framework-option:hover {
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-finanzen"] .framework-option.selected {
    border-color: var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.1);
}

/* ========================================
   PERSONALBUCHHALTUNG TAB (Tab 8)
   ======================================== */

body[data-page="vendor-finanzen"] .personal-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em;
    margin-bottom: 1.5em;
}

body[data-page="vendor-finanzen"] .personal-stat-card {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1.25em;
}

body[data-page="vendor-finanzen"] .personal-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3em;
    height: 3em;
    border-radius: 0.75em;
    flex-shrink: 0;
}

body[data-page="vendor-finanzen"] .personal-stat-icon.stat-blue {
    background: rgba(0, 122, 255, 0.12);
    color: var(--ios-system-blue);
}

body[data-page="vendor-finanzen"] .personal-stat-icon.stat-green {
    background: rgba(52, 199, 89, 0.12);
    color: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .personal-stat-icon.stat-orange {
    background: rgba(255, 149, 0, 0.12);
    color: var(--ios-system-orange);
}

body[data-page="vendor-finanzen"] .personal-stat-icon.stat-red {
    background: rgba(255, 59, 48, 0.12);
    color: var(--ios-system-red);
}

body[data-page="vendor-finanzen"] .personal-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.125em;
}

body[data-page="vendor-finanzen"] .personal-stat-label {
    font-size: 0.75em;
    color: var(--text-secondary);
    font-family: var(--font-sans);
}

body[data-page="vendor-finanzen"] .personal-stat-value {
    font-size: 1.375em;
    font-weight: 600;
    color: var(--text-primary);
}

/* Chart Card */
body[data-page="vendor-finanzen"] .personal-chart-card {
    margin-bottom: 1.5em;
    padding: 1.25em;
}

body[data-page="vendor-finanzen"] .personal-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
}

body[data-page="vendor-finanzen"] .personal-chart-container {
    height: 18em;
    position: relative;
}

/* Employee Table */
body[data-page="vendor-finanzen"] .personal-table-card {
    margin-bottom: 1.5em;
}

body[data-page="vendor-finanzen"] .personal-table-header {
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .personal-table-container {
    overflow-x: auto;
}

body[data-page="vendor-finanzen"] .personal-table {
    width: 100%;
    border-collapse: collapse;
}

body[data-page="vendor-finanzen"] .personal-table th {
    text-align: left;
    padding: 0.75em 1em;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-secondary);
}

body[data-page="vendor-finanzen"] .personal-table td {
    padding: 0.75em 1em;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.875em;
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .personal-table th:nth-child(n+3),
body[data-page="vendor-finanzen"] .personal-table td:nth-child(n+3) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body[data-page="vendor-finanzen"] .personal-table tr:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-finanzen"] .personal-table tfoot td {
    font-weight: 700;
    border-top: 2px solid var(--glass-border);
}

/* Budget vs Actual */
body[data-page="vendor-finanzen"] .personal-budget-card {
    padding: 1.25em;
    margin-bottom: 1.5em;
}

body[data-page="vendor-finanzen"] .budget-bars {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="vendor-finanzen"] .budget-bar-row {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

body[data-page="vendor-finanzen"] .budget-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125em;
}

body[data-page="vendor-finanzen"] .budget-bar-label span:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

body[data-page="vendor-finanzen"] .budget-bar-label span:last-child {
    color: var(--text-secondary);
}

body[data-page="vendor-finanzen"] .budget-bar-track {
    height: 0.5em;
    background: var(--glass-secondary);
    border-radius: 999px;
    overflow: hidden;
}

body[data-page="vendor-finanzen"] .budget-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease;
}

body[data-page="vendor-finanzen"] .budget-bar-fill.under {
    background: var(--ios-system-green);
}

body[data-page="vendor-finanzen"] .budget-bar-fill.near {
    background: var(--ios-system-orange);
}

body[data-page="vendor-finanzen"] .budget-bar-fill.over {
    background: var(--ios-system-red);
}

/* Quick Links */
body[data-page="vendor-finanzen"] .personal-quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1em;
}

body[data-page="vendor-finanzen"] .personal-quick-link {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 1em;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

body[data-page="vendor-finanzen"] .personal-quick-link:hover {
    transform: translateY(-2px);
}

body[data-page="vendor-finanzen"] .personal-quick-link svg {
    color: var(--ios-system-orange);
    flex-shrink: 0;
}

/* ========================================
   REPORT FILTERS & TABLES
   ======================================== */

body[data-page="vendor-finanzen"] .report-filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 1em;
    padding: 1em 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1em;
    flex-wrap: wrap;
}

body[data-page="vendor-finanzen"] .report-filter-input {
    padding: 0.375em 0.5em;
    border: 1px solid var(--input-border);
    border-radius: 0.375em;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.8125em;
    font-family: var(--font-sans);
}

body[data-page="vendor-finanzen"] .report-filter-input:focus {
    border-color: var(--input-border-focus);
    outline: none;
}

body[data-page="vendor-finanzen"] .report-filter-select {
    padding: 0.375em 0.5em;
    border: 1px solid var(--input-border);
    border-radius: 0.375em;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.8125em;
    font-family: var(--font-sans);
    min-width: 8em;
}

body[data-page="vendor-finanzen"] .report-filter-select:focus {
    border-color: var(--input-border-focus);
    outline: none;
}

body[data-page="vendor-finanzen"] .report-filter-apply {
    align-self: flex-end;
}

body[data-page="vendor-finanzen"] .report-section {
    margin-bottom: 1.5em;
}

body[data-page="vendor-finanzen"] .report-table {
    width: 100%;
    border-collapse: collapse;
}

body[data-page="vendor-finanzen"] .report-table th {
    text-align: left;
    padding: 0.625em 0.75em;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-secondary);
}

body[data-page="vendor-finanzen"] .report-table td {
    padding: 0.625em 0.75em;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.875em;
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .report-table tr:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-finanzen"] .report-amount-col {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body[data-page="vendor-finanzen"] .report-total-row,
body[data-page="vendor-finanzen"] .total-row {
    border-top: 2px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .report-total-row td,
body[data-page="vendor-finanzen"] .total-row td {
    font-weight: 700;
}

body[data-page="vendor-finanzen"] .report-table .amount-col {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body[data-page="vendor-finanzen"] .positive {
    color: var(--accent-success);
}

body[data-page="vendor-finanzen"] .negative {
    color: var(--accent-danger);
}

/* ========================================
   MODALS
   ======================================== */

body[data-page="vendor-finanzen"] .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

body[data-page="vendor-finanzen"] .modal-container {
    position: relative;
    width: 100%;
    margin: 1em;
    max-height: 90vh;
    overflow-y: auto;
}

body[data-page="vendor-finanzen"] .modal-sm {
    max-width: 32em;
}

body[data-page="vendor-finanzen"] .modal-md {
    max-width: 40em;
}

body[data-page="vendor-finanzen"] .modal-lg {
    max-width: 56em;
}

body[data-page="vendor-finanzen"] .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25em 1.5em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-finanzen"] .modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    border: none;
    background: var(--glass-secondary);
    color: var(--text-secondary);
    border-radius: 0.375em;
    cursor: pointer;
    transition: all 0.15s;
}

body[data-page="vendor-finanzen"] .modal-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-finanzen"] .modal-body {
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="vendor-finanzen"] .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75em;
    padding: 1em 1.5em;
    border-top: 1px solid var(--glass-border);
}

/* ========================================
   EMPTY STATE
   ======================================== */

body[data-page="vendor-finanzen"] .empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-tertiary);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 64em) {
    body[data-page="vendor-finanzen"] .finanzen-summary {
        grid-template-columns: 1fr 1fr 1fr;
    }

    body[data-page="vendor-finanzen"] .personal-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-page="vendor-finanzen"] .reconciliation-split-view {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-finanzen"] .bank-entries-panel,
    body[data-page="vendor-finanzen"] .matching-panel {
        border-radius: 0.75em;
    }

    body[data-page="vendor-finanzen"] .compliance-section-header {
        flex-direction: column;
    }

    /* Simplify table columns for tablet */
    body[data-page="vendor-finanzen"] .table-header,
    body[data-page="vendor-finanzen"] .table-row {
        grid-template-columns:
            minmax(5em, 6em)
            minmax(10em, 1fr)
            minmax(6em, 8em);
    }

    body[data-page="vendor-finanzen"] .table-header .col-category,
    body[data-page="vendor-finanzen"] .table-row .col-category,
    body[data-page="vendor-finanzen"] .table-header .col-konto,
    body[data-page="vendor-finanzen"] .table-row .col-konto,
    body[data-page="vendor-finanzen"] .table-header .col-gegenkonto,
    body[data-page="vendor-finanzen"] .table-row .col-gegenkonto,
    body[data-page="vendor-finanzen"] .table-header .col-mwst,
    body[data-page="vendor-finanzen"] .table-row .col-mwst {
        display: none;
    }
}

@media (max-width: 48em) {
    body[data-page="vendor-finanzen"] .report-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75em;
    }

    body[data-page="vendor-finanzen"] .report-filter-bar .filter-group {
        flex-direction: column;
    }

    body[data-page="vendor-finanzen"] .report-filter-apply {
        align-self: stretch;
    }

    body[data-page="vendor-finanzen"] .vendor-page-container {
        padding: var(--spacing-sm) 0.75em;
    }

    body[data-page="vendor-finanzen"] .finanzen-page-header {
        flex-direction: column;
    }

    body[data-page="vendor-finanzen"] .finanzen-summary {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-finanzen"] .personal-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    body[data-page="vendor-finanzen"] .form-row-2,
    body[data-page="vendor-finanzen"] .form-row-3 {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-finanzen"] .personal-quick-links {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-finanzen"] .kontenplan-account {
        grid-template-columns: 4em 1fr auto;
    }

    body[data-page="vendor-finanzen"] .konto-type {
        display: none;
    }

    body[data-page="vendor-finanzen"] .reports-grid {
        grid-template-columns: 1fr 1fr;
    }

    body[data-page="vendor-finanzen"] .framework-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 30em) {
    body[data-page="vendor-finanzen"] .vendor-page-container {
        padding: var(--spacing-xs) 0.5em;
    }

    body[data-page="vendor-finanzen"] .personal-stats-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-finanzen"] .reports-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-finanzen"] .upload-hero-section {
        padding: 1.5em 1em;
    }

    body[data-page="vendor-finanzen"] .upload-hero-icon {
        width: 4em;
        height: 4em;
    }

    body[data-page="vendor-finanzen"] .upload-hero-icon svg {
        width: 2.25em;
        height: 2.25em;
    }

    body[data-page="vendor-finanzen"] .upload-hero-title {
        font-size: 1.25em;
    }

    body[data-page="vendor-finanzen"] .upload-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    body[data-page="vendor-finanzen"] .upload-hero-btn {
        justify-content: center;
    }
}

/**
 * @file vendor-chat.css
 * @filepath public/css/pages/vendor-chat.css
 * @directory public/css/pages
 * @access_level PUBLIC
 * @security_level LOW
 * @last_updated 2026-02-25
 *
 * Page-specific styles for the COEUS Vendor Chat (/vendor-chat.html).
 * Scoped via body[data-page="vendor-chat"].
 *
 * Layout: flex column filling viewport (toolbar -> content [sidebar + panel])
 * Works alongside the menubar (body.has-menubar -> padding-left offset).
 *
 * Sections: page reset, shell, toolbar, sidebar, chat panel, messages,
 *   composer, welcome screen, typing indicator, markdown rendering,
 *   tool-call blocks, per-message meta, conversation list, responsive.
 *
 * <file_documentation>
 *   <purpose>
 *     Full chat UI styles for the vendor AI agent interface with SSE streaming,
 *     tool-call rendering, collapsible conversation sidebar, and voice input.
 *   </purpose>
 *   <theme_support>All 5 themes via CSS variables</theme_support>
 *   <dependencies>
 *     - public/css/core/variables-v2.css (design tokens)
 *     - public/css/core/themes-v2.css (theme definitions)
 *   </dependencies>
 * </file_documentation>
 */

/* ============================================================================
   PAGE RESET — prevent body scroll, lock viewport
   ============================================================================ */

body[data-page="vendor-chat"] {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

/* ============================================================================
   SHELL — flex column filling entire viewport
   ============================================================================ */

body[data-page="vendor-chat"] .vc-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: transparent;
}

/* ============================================================================
   TOOLBAR — fixed header bar
   ============================================================================ */

body[data-page="vendor-chat"] .vc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75em;
    padding: 0 1.25em;
    height: 3.25em;
    min-height: 3.25em;
    border-bottom: 0.0625em solid var(--glass-border);
    background: var(--glass-primary);
    backdrop-filter: blur(1em) saturate(120%);
    -webkit-backdrop-filter: blur(1em) saturate(120%);
    flex-shrink: 0;
    z-index: 10;
}

body[data-page="vendor-chat"] .vc-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75em;
    min-width: 0;
}

body[data-page="vendor-chat"] .vc-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.625em;
    flex-shrink: 0;
}

/* ── Toolbar buttons ── */

body[data-page="vendor-chat"] .vc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.75em;
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.5em;
    background: var(--glass-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

body[data-page="vendor-chat"] .vc-btn:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-chat"] .vc-btn svg {
    flex-shrink: 0;
}

/* ── Select dropdown ── */

body[data-page="vendor-chat"] .vc-select {
    padding: 0.375em 0.625em;
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.5em;
    background: var(--glass-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    cursor: pointer;
    transition: background 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

body[data-page="vendor-chat"] .vc-select:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-chat"] .vc-select:focus {
    outline: 0.125em solid var(--ios-system-orange);
    outline-offset: 0.0625em;
}

/* ── Credits toggle ── */

body[data-page="vendor-chat"] .vc-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    cursor: pointer;
    font-size: 0.75em;
    color: var(--text-secondary);
    user-select: none;
}

body[data-page="vendor-chat"] .vc-toggle-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

body[data-page="vendor-chat"] .vc-toggle-slider {
    position: relative;
    width: 2em;
    height: 1.125em;
    background: var(--glass-secondary);
    border-radius: 0.5625em;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

body[data-page="vendor-chat"] .vc-toggle-slider::after {
    content: '';
    position: absolute;
    top: 0.125em;
    left: 0.125em;
    width: 0.875em;
    height: 0.875em;
    border-radius: 50%;
    background: var(--text-tertiary);
    transition: transform 0.2s ease, background 0.2s ease;
}

body[data-page="vendor-chat"] .vc-toggle-label input:checked + .vc-toggle-slider {
    background: var(--ios-system-orange);
}

body[data-page="vendor-chat"] .vc-toggle-label input:checked + .vc-toggle-slider::after {
    transform: translateX(0.875em);
    background: #ffffff;
}

/* ── Token display ── */

body[data-page="vendor-chat"] .vc-token-display {
    font-size: 0.75em;
    color: var(--text-tertiary);
    font-family: var(--font-sans);
}

/* ============================================================================
   CONTENT AREA — sidebar + chat panel
   ============================================================================ */

body[data-page="vendor-chat"] .vc-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* ============================================================================
   SIDEBAR — conversation list (collapsible)
   ============================================================================ */

body[data-page="vendor-chat"] .vc-sidebar {
    width: 18em;
    max-width: 18em;
    min-width: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 0.0625em solid var(--glass-border);
    background: var(--glass-primary);
    backdrop-filter: blur(1em);
    -webkit-backdrop-filter: blur(1em);
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 20;
}

body[data-page="vendor-chat"] .vc-sidebar.vc-sidebar-open {
    transform: translateX(0);
}

body[data-page="vendor-chat"] .vc-sidebar-header {
    padding: 0.75em 1em;
    border-bottom: 0.0625em solid var(--glass-border);
    flex-shrink: 0;
}

body[data-page="vendor-chat"] .vc-sidebar-title {
    font-family: var(--font-serif);
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

body[data-page="vendor-chat"] .vc-conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5em;
    -webkit-overflow-scrolling: touch;
}

body[data-page="vendor-chat"] .vc-conversation-list::-webkit-scrollbar {
    width: 0.25em;
}

body[data-page="vendor-chat"] .vc-conversation-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 0.125em;
}

body[data-page="vendor-chat"] .vc-sidebar-empty {
    color: var(--text-tertiary);
    font-size: 0.8125em;
    text-align: center;
    padding: 2em 1em;
}

/* ── Conversation item ── */

body[data-page="vendor-chat"] .vc-conversation-item {
    display: flex;
    flex-direction: column;
    gap: 0.125em;
    padding: 0.625em 0.75em;
    border-radius: 0.5em;
    cursor: pointer;
    margin-bottom: 0.25em;
    transition: background 0.15s ease;
    position: relative;
}

body[data-page="vendor-chat"] .vc-conversation-item:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-chat"] .vc-conversation-item.vc-active {
    background: var(--glass-secondary);
}

body[data-page="vendor-chat"] .vc-conversation-title {
    font-size: 0.8125em;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 1.5em;
}

body[data-page="vendor-chat"] .vc-conversation-date {
    font-size: 0.6875em;
    color: var(--text-tertiary);
}

body[data-page="vendor-chat"] .vc-conversation-actions {
    position: absolute;
    top: 0.5em;
    right: 0.5em;
    opacity: 0;
    transition: opacity 0.15s ease;
}

body[data-page="vendor-chat"] .vc-conversation-item:hover .vc-conversation-actions {
    opacity: 1;
}

body[data-page="vendor-chat"] .vc-conversation-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    height: 1.5em;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    border-radius: 0.25em;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

body[data-page="vendor-chat"] .vc-conversation-delete:hover {
    color: var(--ios-system-red);
    background: var(--glass-hover);
}

body[data-page="vendor-chat"] .vc-fade-out {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* ============================================================================
   CHAT PANEL — messages + composer
   ============================================================================ */

body[data-page="vendor-chat"] .vc-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

/* ============================================================================
   WELCOME SCREEN
   ============================================================================ */

body[data-page="vendor-chat"] .vc-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    padding: 2em 1.5em;
    gap: 0.75em;
}

body[data-page="vendor-chat"] .vc-welcome-title {
    font-family: var(--font-serif);
    font-size: 1.75em;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0;
}

body[data-page="vendor-chat"] .vc-welcome-name {
    font-style: italic;
    font-weight: 400;
}

body[data-page="vendor-chat"] .vc-welcome-subtitle {
    font-size: 0.9375em;
    color: var(--text-secondary);
    max-width: 28em;
    line-height: 1.6;
    margin: 0;
}

body[data-page="vendor-chat"] .vc-welcome-help {
    display: block;
    margin-top: 0.75em;
    color: var(--text-tertiary);
    font-size: 0.875em;
}

body[data-page="vendor-chat"] .vc-welcome-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    justify-content: center;
    margin-top: 0.75em;
    max-width: 36em;
}

body[data-page="vendor-chat"] .vc-suggestion {
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 1.5em;
    padding: 0.5em 1em;
    font-size: 0.8125em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    font-family: var(--font-sans);
}

body[data-page="vendor-chat"] .vc-suggestion:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* ============================================================================
   MESSAGES AREA
   ============================================================================ */

body[data-page="vendor-chat"] .vc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1em 1.5em;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body[data-page="vendor-chat"] .vc-messages::-webkit-scrollbar {
    width: 0.375em;
}

body[data-page="vendor-chat"] .vc-messages::-webkit-scrollbar-track {
    background: transparent;
}

body[data-page="vendor-chat"] .vc-messages::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 0.1875em;
}

body[data-page="vendor-chat"] .vc-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-quaternary);
}

/* ============================================================================
   MESSAGE BUBBLES
   ============================================================================ */

body[data-page="vendor-chat"] .vc-message {
    max-width: 48em;
    margin: 0 auto 1em;
    padding: 0.75em 1em;
    border-radius: 1em;
    font-size: 0.9375em;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    animation: vc-message-in 0.2s ease;
}

@keyframes vc-message-in {
    from {
        opacity: 0;
        transform: translateY(0.5em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User messages — right-aligned, accent color */
body[data-page="vendor-chat"] .vc-message.user {
    background: var(--ios-system-orange);
    color: #ffffff;
    margin-left: auto;
    margin-right: 0;
    max-width: 36em;
    border-bottom-right-radius: 0.25em;
}

/* Assistant messages — left-aligned, glass background */
body[data-page="vendor-chat"] .vc-message.assistant {
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    color: var(--text-primary);
    border-bottom-left-radius: 0.25em;
}

/* System messages — centered, muted */
body[data-page="vendor-chat"] .vc-message.system {
    text-align: center;
    max-width: 36em;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.8125em;
    border: 0.0625em dashed var(--glass-border);
}

body[data-page="vendor-chat"] .vc-system-text {
    font-family: var(--font-sans);
}

/* ============================================================================
   MARKDOWN RENDERING (inside assistant messages)
   ============================================================================ */

body[data-page="vendor-chat"] .vc-message.assistant strong {
    font-weight: 600;
}

body[data-page="vendor-chat"] .vc-message.assistant em {
    font-style: italic;
}

body[data-page="vendor-chat"] .vc-message.assistant code {
    background: var(--glass-secondary);
    padding: 0.125em 0.375em;
    border-radius: 0.25em;
    font-size: 0.875em;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

body[data-page="vendor-chat"] .vc-message.assistant pre {
    background: var(--glass-secondary);
    border-radius: 0.5em;
    padding: 0.75em 1em;
    overflow-x: auto;
    margin: 0.5em 0;
    border: 0.0625em solid var(--glass-border);
}

body[data-page="vendor-chat"] .vc-message.assistant pre code {
    background: transparent;
    padding: 0;
    font-size: 0.8125em;
}

body[data-page="vendor-chat"] .vc-message.assistant h2,
body[data-page="vendor-chat"] .vc-message.assistant h3,
body[data-page="vendor-chat"] .vc-message.assistant h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.75em 0 0.375em;
    line-height: 1.3;
}

body[data-page="vendor-chat"] .vc-message.assistant h2 { font-size: 1.15em; }
body[data-page="vendor-chat"] .vc-message.assistant h3 { font-size: 1.05em; }
body[data-page="vendor-chat"] .vc-message.assistant h4 { font-size: 0.95em; }

body[data-page="vendor-chat"] .vc-message.assistant ul,
body[data-page="vendor-chat"] .vc-message.assistant ol {
    padding-left: 1.5em;
    margin: 0.5em 0;
}

body[data-page="vendor-chat"] .vc-message.assistant li {
    margin-bottom: 0.25em;
}

body[data-page="vendor-chat"] .vc-message.assistant p {
    margin: 0.5em 0;
}

body[data-page="vendor-chat"] .vc-message.assistant p:first-child {
    margin-top: 0;
}

body[data-page="vendor-chat"] .vc-message.assistant p:last-child {
    margin-bottom: 0;
}

/* ============================================================================
   TOOL-CALL BLOCKS (collapsible)
   ============================================================================ */

body[data-page="vendor-chat"] .vc-tool-call {
    margin: 0.625em 0;
    border: 0.0625em solid var(--glass-border);
    border-radius: 0.5em;
    overflow: hidden;
    background: var(--glass-secondary);
}

body[data-page="vendor-chat"] .vc-tool-call-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.75em;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

body[data-page="vendor-chat"] .vc-tool-call-header:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-chat"] .vc-tool-call-header::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 0.3em solid transparent;
    border-right: 0.3em solid transparent;
    border-top: 0.3em solid var(--text-tertiary);
    margin-left: auto;
    transition: transform 0.2s ease;
}

body[data-page="vendor-chat"] .vc-tool-call-header.vc-expanded::after {
    transform: rotate(180deg);
}

body[data-page="vendor-chat"] .vc-tool-spinner {
    width: 0.75em;
    height: 0.75em;
    border: 0.125em solid var(--glass-border);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: vc-spin 0.6s linear infinite;
    flex-shrink: 0;
}

body[data-page="vendor-chat"] .vc-tool-call-name {
    font-size: 0.75em;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--text-secondary);
}

body[data-page="vendor-chat"] .vc-tool-call-status {
    font-size: 0.6875em;
    color: var(--text-tertiary);
    margin-left: 0.5em;
}

body[data-page="vendor-chat"] .vc-tool-call-content {
    padding: 0.5em 0.75em;
    border-top: 0.0625em solid var(--glass-border);
}

body[data-page="vendor-chat"] .vc-tool-result {
    font-size: 0.75em;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 12em;
    overflow-y: auto;
    margin: 0;
}

body[data-page="vendor-chat"] .vc-tool-done .vc-tool-call-status {
    color: var(--ios-system-green);
}

body[data-page="vendor-chat"] .vc-tool-error .vc-tool-call-status {
    color: var(--ios-system-red);
}

/* ============================================================================
   PER-MESSAGE META (credits/tools)
   ============================================================================ */

body[data-page="vendor-chat"] .vc-message-meta {
    display: flex;
    gap: 0.75em;
    margin-top: 0.5em;
    padding-top: 0.375em;
    border-top: 0.0625em solid var(--glass-border);
    font-size: 0.6875em;
    color: var(--text-tertiary);
    font-family: var(--font-sans);
}

body[data-page="vendor-chat"] .vc-meta-cost {
    color: var(--ios-system-orange);
}

/* ============================================================================
   COMPOSER — input area at bottom
   ============================================================================ */

body[data-page="vendor-chat"] .vc-composer {
    padding: 0.625em 1.25em 1em;
    flex-shrink: 0;
    border-top: 0.0625em solid var(--glass-border);
    background: var(--glass-primary);
    backdrop-filter: blur(1em);
    -webkit-backdrop-filter: blur(1em);
}

body[data-page="vendor-chat"] .vc-composer-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5em;
}

body[data-page="vendor-chat"] .vc-composer-input-wrap {
    flex: 1;
    position: relative;
}

body[data-page="vendor-chat"] .vc-composer-input {
    width: 100%;
    border: 0.0625em solid var(--glass-border);
    border-radius: 1.25em;
    background: var(--glass-secondary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9375em;
    line-height: 1.4;
    padding: 0.5em 1em;
    resize: none;
    outline: none;
    max-height: 10em;
    min-height: 1.4em;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

body[data-page="vendor-chat"] .vc-composer-input:focus {
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-chat"] .vc-composer-input::placeholder {
    color: var(--text-tertiary);
}

/* ── Side buttons (mic) ── */

body[data-page="vendor-chat"] .vc-composer-side-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25em;
    height: 2.25em;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

body[data-page="vendor-chat"] .vc-composer-side-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-chat"] .vc-composer-side-btn.vc-recording {
    background: var(--ios-system-red);
    color: #ffffff;
    animation: vc-pulse 1s infinite;
}

/* ── Send button ── */

body[data-page="vendor-chat"] .vc-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25em;
    height: 2.25em;
    border-radius: 50%;
    border: none;
    background: var(--ios-system-orange);
    color: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

body[data-page="vendor-chat"] .vc-send-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

body[data-page="vendor-chat"] .vc-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================================
   TYPING INDICATOR
   ============================================================================ */

body[data-page="vendor-chat"] .vc-typing-indicator {
    display: flex;
    gap: 0.3em;
    padding: 0.75em 1em;
    max-width: 5em;
    margin: 0 auto 1em 0;
    background: var(--glass-primary);
    border: 0.0625em solid var(--glass-border);
    border-radius: 1em;
    border-bottom-left-radius: 0.25em;
    animation: vc-message-in 0.2s ease;
}

body[data-page="vendor-chat"] .vc-typing-dot {
    width: 0.4em;
    height: 0.4em;
    border-radius: 50%;
    background: var(--text-tertiary);
    animation: vc-typing 1.4s infinite both;
}

body[data-page="vendor-chat"] .vc-typing-dot:nth-child(2) {
    animation-delay: 0.16s;
}

body[data-page="vendor-chat"] .vc-typing-dot:nth-child(3) {
    animation-delay: 0.32s;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes vc-typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes vc-spin {
    to { transform: rotate(360deg); }
}

@keyframes vc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

body[data-page="vendor-chat"] .vc-hidden {
    display: none;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

/* Desktop: sidebar can be inline */
@media (min-width: 64em) {
    body[data-page="vendor-chat"] .vc-sidebar {
        position: relative;
        transform: translateX(0);
    }

    body[data-page="vendor-chat"] .vc-sidebar:not(.vc-sidebar-open) {
        width: 0;
        max-width: 0;
        border-right: none;
        overflow: hidden;
    }

    body[data-page="vendor-chat"] .vc-sidebar.vc-sidebar-open {
        width: 18em;
        max-width: 18em;
    }
}

/* Tablet */
@media (max-width: 48em) {
    body[data-page="vendor-chat"] .vc-toolbar {
        padding: 0 0.75em;
        gap: 0.5em;
    }

    body[data-page="vendor-chat"] .vc-toolbar-left {
        gap: 0.5em;
    }

    body[data-page="vendor-chat"] .vc-toggle-label .vc-toggle-text {
        display: none;
    }

    body[data-page="vendor-chat"] .vc-messages {
        padding: 0.75em;
    }

    body[data-page="vendor-chat"] .vc-message {
        max-width: 100%;
    }

    body[data-page="vendor-chat"] .vc-message.user {
        max-width: 90%;
    }

    body[data-page="vendor-chat"] .vc-composer {
        padding: 0.5em 0.75em 0.75em;
    }

    body[data-page="vendor-chat"] .vc-welcome {
        padding: 1.5em 1em;
    }

    body[data-page="vendor-chat"] .vc-welcome-suggestions {
        flex-direction: column;
        align-items: center;
    }
}

/* Mobile */
@media (max-width: 30em) {
    body[data-page="vendor-chat"] .vc-welcome-title {
        font-size: 1.375em;
    }

    body[data-page="vendor-chat"] .vc-btn span {
        display: none;
    }

    body[data-page="vendor-chat"] .vc-btn {
        padding: 0.375em;
    }

    body[data-page="vendor-chat"] .vc-select {
        max-width: 7em;
    }
}

/**
 * COEUS Settings Pages - Shared Layout CSS
 *
 * PURPOSE: Shared 2-column layout for all settings pages
 * SCOPE: body[data-page^="settings-"]
 *
 * LAYOUT: 15em sidebar + flex-1 content area
 * Based on: user-profile-page.css + vendor-settings.css patterns
 *
 * ACCENT: Sunset orange (--ios-system-orange) throughout
 * Focus states: Orange focus ring on all interactive elements (no browser blue)
 * Theme previews: 4:3 aspect ratio with actual background images from /assets/
 *
 * DEPENDENCIES:
 * - core/variables-v2.css (theme vars)
 * - core/glass-system-v2.css (glass effects)
 */

/* ===== Navigation Header ===== */
body[data-page^="settings-"] .settings-nav-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-secondary);
    backdrop-filter: blur(1.5em);
    -webkit-backdrop-filter: blur(1.5em);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75em 1.5em;
}

body[data-page^="settings-"] .settings-nav-container {
    max-width: 90em;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body[data-page^="settings-"] .settings-nav-title {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.125em;
}

body[data-page^="settings-"] .settings-nav-buttons {
    display: flex;
    gap: 0.75em;
    flex-wrap: wrap;
}

body[data-page^="settings-"] .settings-nav-buttons .nav-btn {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 1em;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875em;
    transition: background 0.2s, border-color 0.2s;
}

body[data-page^="settings-"] .settings-nav-buttons .nav-btn:hover {
    background: var(--glass-hover);
}

body[data-page^="settings-"] .settings-nav-buttons .nav-btn-primary {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border-color: var(--ios-system-orange);
}

body[data-page^="settings-"] .settings-nav-buttons .nav-btn-primary:hover {
    opacity: 0.9;
}

/* ===== Page-Level Tab Bar (cross-page navigation) ===== */
body[data-page^="settings-"] .settings-page-tabs {
    display: flex;
    gap: 0.25em;
    max-width: 90em;
    margin: 0 auto;
    padding: 0.5em 1.5em 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body[data-page^="settings-"] .settings-page-tab {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.625em 1em;
    border-radius: 0.5em 0.5em 0 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875em;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    border-bottom: 2px solid transparent;
}

body[data-page^="settings-"] .settings-page-tab:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page^="settings-"] .settings-page-tab.active {
    color: var(--ios-system-orange);
    border-bottom-color: var(--ios-system-orange);
    font-weight: 600;
}

body[data-page^="settings-"] .settings-page-tab .radix-icon {
    font-size: 1em;
}

/* ===== Main Container ===== */
body[data-page^="settings-"] .settings-main {
    max-width: 90em;
    margin: 0 auto;
    padding: 1.5em;
}

/* ===== Loading State ===== */
body[data-page^="settings-"] .settings-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1em;
    padding: 4em 2em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 1em;
    backdrop-filter: blur(1.5em);
}

body[data-page^="settings-"] .settings-loading .spinner {
    animation: settings-spin 1s linear infinite;
    font-size: 1.5em;
    color: var(--text-secondary);
}

@keyframes settings-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body[data-page^="settings-"] .settings-loading p {
    color: var(--text-secondary);
    font-size: 0.9375em;
}

/* ===== Two-Column Layout ===== */
body[data-page^="settings-"] .settings-layout {
    display: grid;
    grid-template-columns: 15em 1fr;
    gap: 1.5em;
    align-items: start;
}

/* ===== Sidebar Navigation ===== */
body[data-page^="settings-"] .settings-sidebar {
    position: sticky;
    top: 5em;
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 1em;
    padding: 0.5em;
    backdrop-filter: blur(1.5em);
    -webkit-backdrop-filter: blur(1.5em);
}

body[data-page^="settings-"] .settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.625em;
    padding: 0.625em 0.875em;
    border-radius: 0.625em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-size: 0.9375em;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

body[data-page^="settings-"] .settings-nav-item:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page^="settings-"] .settings-nav-item.active {
    background: var(--glass-secondary);
    color: var(--ios-system-orange);
    font-weight: 600;
}

body[data-page^="settings-"] .settings-nav-item .radix-icon {
    font-size: 1.125em;
    flex-shrink: 0;
}

body[data-page^="settings-"] .settings-nav-item .nav-badge {
    margin-left: auto;
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
    font-size: 0.6875em;
    font-weight: 700;
    min-width: 1.375em;
    height: 1.375em;
    line-height: 1.375em;
    text-align: center;
    border-radius: 50%;
    padding: 0 0.25em;
}

/* ===== Content Area ===== */
body[data-page^="settings-"] .settings-content {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 1em;
    padding: 2em;
    backdrop-filter: blur(1.5em);
    -webkit-backdrop-filter: blur(1.5em);
    min-height: 25em;
}

/* ===== Section Visibility ===== */
body[data-page^="settings-"] .settings-section {
    display: none;
}

body[data-page^="settings-"] .settings-section.active {
    display: block;
}

/* ===== Section Headers ===== */
body[data-page^="settings-"] .settings-section-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page^="settings-"] .settings-section-header h2 {
    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-primary);
}

body[data-page^="settings-"] .settings-section-header .radix-icon {
    font-size: 1.375em;
    color: var(--ios-system-orange);
}

/* ===== Info Rows ===== */
body[data-page^="settings-"] .settings-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875em 1em;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    transition: background 0.15s;
}

body[data-page^="settings-"] .settings-info-row:first-child {
    border-radius: 0.5em 0.5em 0 0;
}

body[data-page^="settings-"] .settings-info-row:last-child {
    border-bottom: none;
    border-radius: 0 0 0.5em 0.5em;
}

body[data-page^="settings-"] .settings-info-row:hover {
    background: var(--glass-hover);
}

body[data-page^="settings-"] .settings-info-label {
    color: var(--text-secondary);
    font-size: 0.9375em;
    flex-shrink: 0;
    min-width: 10em;
}

body[data-page^="settings-"] .settings-info-value {
    color: var(--text-primary);
    font-size: 0.9375em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

/* ===== Form Elements ===== */
body[data-page^="settings-"] .settings-input,
body[data-page^="settings-"] .settings-select {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.625em 0.875em;
    color: var(--text-primary);
    font-size: 0.9375em;
    width: 100%;
    transition: border-color 0.2s;
}

body[data-page^="settings-"] .settings-input:focus,
body[data-page^="settings-"] .settings-select:focus {
    border-color: var(--ios-system-orange);
    outline: none;
}

body[data-page^="settings-"] .settings-input::placeholder {
    color: var(--text-tertiary);
}

/* ===== Buttons ===== */
body[data-page^="settings-"] .settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.625em 1.25em;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875em;
    transition: background 0.2s, border-color 0.2s;
}

body[data-page^="settings-"] .settings-btn:hover {
    background: var(--glass-hover);
}

body[data-page^="settings-"] .settings-btn-primary {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border-color: var(--ios-system-orange);
}

body[data-page^="settings-"] .settings-btn-primary:hover {
    opacity: 0.9;
}

body[data-page^="settings-"] .settings-btn-danger {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
    border-color: var(--ios-system-red);
}

body[data-page^="settings-"] .settings-btn-danger:hover {
    opacity: 0.9;
}

body[data-page^="settings-"] .settings-btn-small {
    padding: 0.375em 0.75em;
    font-size: 0.8125em;
}

body[data-page^="settings-"] .settings-edit-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.25em;
    border-radius: 0.25em;
    transition: color 0.2s;
}

body[data-page^="settings-"] .settings-edit-btn:hover {
    color: var(--ios-system-orange);
}

/* ===== Cards ===== */
body[data-page^="settings-"] .settings-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 1.25em;
    margin-bottom: 1em;
}

body[data-page^="settings-"] .settings-card-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1em;
}

body[data-page^="settings-"] .settings-card-header h3 {
    font-size: 1.0625em;
    font-weight: 600;
    color: var(--text-primary);
}

body[data-page^="settings-"] .settings-card-header .radix-icon {
    color: var(--ios-system-orange);
}

/* ===== Danger Zone ===== */
body[data-page^="settings-"] .settings-danger-zone {
    border: 1px solid var(--ios-system-red);
    border-radius: 0.75em;
    padding: 1.25em;
    margin-top: 2em;
}

body[data-page^="settings-"] .settings-danger-zone h4 {
    color: var(--ios-system-red);
    font-size: 1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.5em;
}

body[data-page^="settings-"] .settings-danger-zone p {
    color: var(--text-secondary);
    font-size: 0.875em;
    margin-bottom: 1em;
}

/* ===== Separator ===== */
body[data-page^="settings-"] .settings-separator {
    border-top: 1px solid var(--glass-border);
    margin: 1.5em 0;
}

/* ===== Toast Notifications ===== */
.settings-toast {
    position: fixed;
    bottom: 1.5em;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    padding: 0.75em 1.5em;
    border-radius: 0.5em;
    font-size: 0.9375em;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 25em;
    text-align: center;
    backdrop-filter: blur(1.5em);
}

.settings-toast-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.settings-toast-success {
    background: var(--ios-system-green);
    color: var(--button-text-on-color);
}

.settings-toast-error {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
}

.settings-toast-info {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

.settings-toast-warning {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

/* ===== Expandable Sections ===== */
body[data-page^="settings-"] .settings-expandable {
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    margin-bottom: 0.75em;
    overflow: hidden;
}

body[data-page^="settings-"] .settings-expandable-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875em 1.125em;
    cursor: pointer;
    background: var(--glass-primary);
    transition: background 0.2s;
}

body[data-page^="settings-"] .settings-expandable-header:hover {
    background: var(--glass-hover);
}

body[data-page^="settings-"] .settings-expandable-header h4 {
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page^="settings-"] .settings-expandable-body {
    display: none;
    padding: 1em 1.125em;
    border-top: 1px solid var(--glass-border);
}

body[data-page^="settings-"] .settings-expandable.open .settings-expandable-body {
    display: block;
}

body[data-page^="settings-"] .settings-expandable .chevron-icon {
    width: 1em;
    height: 1em;
    transition: transform 0.2s;
    color: var(--text-tertiary);
}

body[data-page^="settings-"] .settings-expandable.open .chevron-icon {
    transform: rotate(90deg);
}

/* ===== Theme Cards (shared across profile + vendor) ===== */
body[data-page^="settings-"] .settings-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8em, 1fr));
    gap: 0.75em;
}

body[data-page^="settings-"] .settings-theme-card {
    border: 2px solid var(--glass-border);
    border-radius: 0.625em;
    padding: 0.75em;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: var(--glass-primary);
}

body[data-page^="settings-"] .settings-theme-card:hover {
    border-color: var(--text-tertiary);
}

body[data-page^="settings-"] .settings-theme-card.active {
    border-color: var(--ios-system-orange);
}

body[data-page^="settings-"] .settings-theme-card .theme-preview {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0.375em;
    margin-bottom: 0.5em;
    background-size: cover;
    background-position: center;
}

/* Theme preview backgrounds — actual theme images */
body[data-page^="settings-"] .theme-preview-light {
    background-image: url('/assets/light.jpg');
}

body[data-page^="settings-"] .theme-preview-lightmodern {
    background-image: url('/assets/lightmodern.jpg');
}

body[data-page^="settings-"] .theme-preview-dark {
    background-image: url('/assets/dark.jpg');
}

body[data-page^="settings-"] .theme-preview-darkart {
    background-image: url('/assets/darkart.jpg');
}

body[data-page^="settings-"] .theme-preview-darkmodern {
    background-image: url('/assets/darkmodern.jpg');
}

body[data-page^="settings-"] .settings-theme-card .theme-label {
    font-size: 0.8125em;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== Font Size Selector ===== */
body[data-page^="settings-"] .settings-font-selector {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

body[data-page^="settings-"] .settings-font-option {
    flex: 1;
    min-width: 3em;
    padding: 0.5em 0.75em;
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    text-align: center;
    cursor: pointer;
    color: var(--text-secondary);
    background: var(--glass-primary);
    transition: border-color 0.2s, color 0.2s;
    font-size: 0.875em;
}

body[data-page^="settings-"] .settings-font-option:hover {
    border-color: var(--text-tertiary);
}

body[data-page^="settings-"] .settings-font-option.active {
    border-color: var(--ios-system-orange);
    color: var(--ios-system-orange);
    font-weight: 600;
}

/* Suppress browser default blue focus ring on all settings buttons */
body[data-page^="settings-"] button:focus,
body[data-page^="settings-"] button:focus-visible {
    outline: none;
}

body[data-page^="settings-"] .settings-font-option:focus-visible,
body[data-page^="settings-"] .settings-model-option:focus-visible,
body[data-page^="settings-"] .settings-currency-option:focus-visible {
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 2px rgba(255, 149, 0, 0.25);
}

body[data-page^="settings-"] .settings-theme-card:focus-visible {
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 2px rgba(255, 149, 0, 0.25);
}

body[data-page^="settings-"] .settings-nav-item:focus-visible {
    outline: 2px solid var(--ios-system-orange);
    outline-offset: -2px;
}

/* ===== Empty State ===== */
body[data-page^="settings-"] .settings-empty {
    text-align: center;
    padding: 2em;
    color: var(--text-tertiary);
}

body[data-page^="settings-"] .settings-empty .radix-icon {
    font-size: 2em;
    margin-bottom: 0.5em;
    display: block;
}

/* ===== Credit Usage Tree Chart ===== */
body[data-page="settings-billing"] .usage-breakdown-total {
    margin-left: auto;
    font-size: 0.8125em;
    color: var(--text-tertiary);
    font-weight: 400;
}

body[data-page="settings-billing"] .usage-overall-bar {
    height: 0.5em;
    background: var(--glass-secondary);
    border-radius: 0.25em;
    overflow: hidden;
    margin-bottom: 1.25em;
}

body[data-page="settings-billing"] .usage-overall-fill {
    height: 100%;
    background: var(--ios-system-orange);
    border-radius: 0.25em;
    transition: width 0.6s ease;
    width: 0%;
}

body[data-page="settings-billing"] .usage-tree {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

/* Category row (top level) */
body[data-page="settings-billing"] .usage-category {
    border-radius: 0.5em;
    overflow: hidden;
}

body[data-page="settings-billing"] .usage-category-header {
    display: flex;
    align-items: center;
    gap: 0.625em;
    padding: 0.625em 0.75em;
    cursor: pointer;
    background: var(--glass-primary);
    transition: background 0.15s;
    border: 1px solid transparent;
    border-radius: 0.5em;
}

body[data-page="settings-billing"] .usage-category-header:hover {
    background: var(--glass-hover);
}

body[data-page="settings-billing"] .usage-category.open .usage-category-header {
    border-radius: 0.5em 0.5em 0 0;
    border-color: var(--glass-border);
    border-bottom-color: transparent;
}

body[data-page="settings-billing"] .usage-cat-icon {
    font-size: 1em;
    color: var(--ios-system-orange);
    flex-shrink: 0;
}

body[data-page="settings-billing"] .usage-cat-name {
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

body[data-page="settings-billing"] .usage-cat-credits {
    font-size: 0.875em;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 5em;
    text-align: right;
}

body[data-page="settings-billing"] .usage-cat-bar-wrap {
    flex: 0 0 7em;
    height: 0.375em;
    background: var(--glass-secondary);
    border-radius: 0.25em;
    overflow: hidden;
}

body[data-page="settings-billing"] .usage-cat-bar {
    height: 100%;
    border-radius: 0.25em;
    transition: width 0.5s ease;
}

body[data-page="settings-billing"] .usage-chevron {
    font-size: 0.75em;
    color: var(--text-tertiary);
    transition: transform 0.2s;
    flex-shrink: 0;
}

body[data-page="settings-billing"] .usage-category.open .usage-chevron {
    transform: rotate(90deg);
}

/* Subcategory rows */
body[data-page="settings-billing"] .usage-subcategories {
    display: none;
    flex-direction: column;
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 0.5em 0.5em;
    overflow: hidden;
}

body[data-page="settings-billing"] .usage-category.open .usage-subcategories {
    display: flex;
}

body[data-page="settings-billing"] .usage-sub-row {
    display: flex;
    align-items: center;
    gap: 0.625em;
    padding: 0.5em 0.75em 0.5em 2em;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-primary);
}

body[data-page="settings-billing"] .usage-sub-row:first-child {
    border-top: none;
}

body[data-page="settings-billing"] .usage-sub-indent {
    width: 0.625em;
    height: 1px;
    background: var(--glass-border);
    flex-shrink: 0;
    margin-right: 0.25em;
}

body[data-page="settings-billing"] .usage-sub-name {
    font-size: 0.875em;
    color: var(--text-secondary);
    flex: 1;
}

body[data-page="settings-billing"] .usage-sub-meta {
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

body[data-page="settings-billing"] .usage-sub-credits {
    font-size: 0.875em;
    color: var(--text-primary);
    font-weight: 500;
    min-width: 5em;
    text-align: right;
}

body[data-page="settings-billing"] .usage-sub-bar-wrap {
    flex: 0 0 5em;
    height: 0.25em;
    background: var(--glass-secondary);
    border-radius: 0.25em;
    overflow: hidden;
}

body[data-page="settings-billing"] .usage-sub-bar {
    height: 100%;
    border-radius: 0.25em;
    transition: width 0.5s ease;
}

/* Per-user list */
body[data-page="settings-billing"] .usage-user-list {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

body[data-page="settings-billing"] .usage-user-row {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

body[data-page="settings-billing"] .usage-user-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="settings-billing"] .usage-user-avatar {
    width: 1.75em;
    height: 1.75em;
    border-radius: 50%;
    background: var(--ios-system-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125em;
    font-weight: 700;
    color: var(--button-text-on-color);
    flex-shrink: 0;
}

body[data-page="settings-billing"] .usage-user-name {
    font-size: 0.9375em;
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

body[data-page="settings-billing"] .usage-user-credits {
    font-size: 0.875em;
    color: var(--text-secondary);
    font-weight: 500;
}

body[data-page="settings-billing"] .usage-user-bar-wrap {
    height: 0.375em;
    background: var(--glass-secondary);
    border-radius: 0.25em;
    overflow: hidden;
}

body[data-page="settings-billing"] .usage-user-bar {
    height: 100%;
    border-radius: 0.25em;
    transition: width 0.5s ease;
    background: var(--ios-system-blue);
}

body[data-page="settings-billing"] .usage-empty-state {
    text-align: center;
    padding: 1.5em;
    color: var(--text-tertiary);
    font-size: 0.9375em;
}

/* ===== Hidden Utility ===== */
body[data-page^="settings-"] .hidden {
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 48em) {
    body[data-page^="settings-"] .settings-layout {
        grid-template-columns: 1fr;
    }

    body[data-page^="settings-"] .settings-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.5em;
        gap: 0.25em;
    }

    body[data-page^="settings-"] .settings-nav-item {
        padding: 0.5em 0.75em;
        font-size: 0.8125em;
        flex: 0 0 auto;
    }

    body[data-page^="settings-"] .settings-content {
        padding: 1em;
    }

    body[data-page^="settings-"] .settings-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25em;
    }

    body[data-page^="settings-"] .settings-info-label {
        min-width: auto;
    }
}

@media (max-width: 30em) {
    body[data-page^="settings-"] .settings-nav-header {
        padding: 0.5em 1em;
    }

    body[data-page^="settings-"] .settings-page-tabs {
        padding: 0.5em 0.75em 0;
    }

    body[data-page^="settings-"] .settings-page-tab {
        padding: 0.5em 0.75em;
        font-size: 0.8125em;
    }

    body[data-page^="settings-"] .settings-page-tab span {
        display: none;
    }

    body[data-page^="settings-"] .settings-page-tab .radix-icon {
        font-size: 1.25em;
    }

    body[data-page^="settings-"] .settings-main {
        padding: 0.75em;
    }

    body[data-page^="settings-"] .settings-sidebar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body[data-page^="settings-"] .settings-nav-item {
        white-space: nowrap;
    }
}

/**
 * @file dienstleister.css
 * @filepath public/css/pages/dienstleister.css
 * @description Unified Dienstleister page — tab system, shared layout, card grids.
 *   Covers all three tabs: Meine Dienstleister, Marktplatz, Ausschreibungen.
 *   Card grid layout using auto-fill minmax(20em, 1fr) for responsive columns.
 *   Accent color: sunset orange (--accent-warning) throughout.
 * @created 2026-02-12
 * @updated 2026-02-13 — spacing, padding, orange accent, bigger modal fonts
 * @updated 2026-03-15 — card grid layout for all tabs, glass-container-thin cards,
 *   vendor card components (avatar, meta, badges, actions), search bar, status badges
 */

/* Sub-files removed during CSS simplification (2026-03-03).
   Tab styles are now inlined in dienstleister.css. */

/* ============================================ */
/*         DIENSTLEISTER PAGE LAYOUT            */
/* ============================================ */

body[data-page="dienstleister"] .dienstleister-page {
    max-width: 90em;
    margin: 0 auto;
    padding: 2em 2em;
}

body[data-page="dienstleister"] .dienstleister-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75em;
}

body[data-page="dienstleister"] .dienstleister-header h1 {
    font-family: var(--font-serif);
    color: var(--text-primary);
}

body[data-page="dienstleister"] .dienstleister-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

body[data-page="dienstleister"] .messages-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 1.5em;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875em;
    transition: background 0.2s, border-color 0.2s;
}

body[data-page="dienstleister"] .messages-badge:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border-hover);
}

body[data-page="dienstleister"] .messages-badge .badge-count {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
    font-size: 0.6875em;
    min-width: 1.25em;
    height: 1.25em;
    line-height: 1.25em;
    text-align: center;
    border-radius: 50%;
    padding: 0 0.25em;
}

/* ============================================ */
/*       SEGMENTED CONTROL (TABS)               */
/* ============================================ */

body[data-page="dienstleister"] .dienstleister-tabs {
    display: flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.3em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.875em;
    margin-bottom: 1.75em;
    width: fit-content;
}

body[data-page="dienstleister"] .dienstleister-tabs button {
    position: relative;
    padding: 0.5em 1.5em;
    border: none;
    border-radius: 0.625em;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

body[data-page="dienstleister"] .dienstleister-tabs button:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
}

body[data-page="dienstleister"] .dienstleister-tabs button[aria-selected="true"] {
    color: var(--text-primary);
    background: rgba(var(--accent-warning-rgb, 255, 149, 0), 0.15);
    box-shadow: 0 1px 4px rgba(var(--accent-warning-rgb, 255, 149, 0), 0.1);
}

body[data-page="dienstleister"] .dienstleister-tabs button .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25em;
    height: 1.25em;
    padding: 0 0.35em;
    margin-left: 0.35em;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 50%;
    background: rgba(var(--accent-warning-rgb, 255, 149, 0), 0.2);
    color: var(--accent-warning, #FF9500);
}

/* ============================================ */
/*           TAB PANELS                         */
/* ============================================ */

body[data-page="dienstleister"] .tab-panel {
    display: none;
}

body[data-page="dienstleister"] .tab-panel.active {
    display: block;
    animation: fadeInTab 0.25s ease;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(0.375em); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================ */
/*           SHARED CONTACT MODAL               */
/* ============================================ */

body[data-page="dienstleister"] .contact-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 1000);
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(0.5em);
}

body[data-page="dienstleister"] .contact-modal-overlay.open {
    display: flex;
}

body[data-page="dienstleister"] .contact-modal {
    width: 100%;
    max-width: 32em;
    margin: 1em;
}

body[data-page="dienstleister"] .contact-modal .ios-title3 {
    font-size: 1.375em;
}

body[data-page="dienstleister"] .contact-modal .ios-subheadline {
    font-size: 0.9375em;
}

body[data-page="dienstleister"] .contact-modal textarea {
    width: 100%;
    min-height: 7em;
    resize: vertical;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    padding: 0.75em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1em;
    transition: border-color 0.2s;
}

body[data-page="dienstleister"] .contact-modal textarea:focus {
    outline: none;
    border-color: var(--accent-warning, #FF9500);
    box-shadow: 0 0 0 2px rgba(var(--accent-warning-rgb, 255, 149, 0), 0.2);
}

body[data-page="dienstleister"] .contact-modal select {
    width: 100%;
    padding: 0.625em 0.875em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1em;
    transition: border-color 0.2s;
}

body[data-page="dienstleister"] .contact-modal select:focus {
    outline: none;
    border-color: var(--accent-warning, #FF9500);
}

body[data-page="dienstleister"] .contact-modal .glass-button {
    font-size: 0.9375em;
}

/* ============================================ */
/*     VENDOR CARDS GRID (shared by all tabs)   */
/* ============================================ */

body[data-page="dienstleister"] .vendor-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20em, 1fr));
    gap: var(--spacing-4, 1em);
}

/* ============================================ */
/*     TAB: MEINE DIENSTLEISTER                 */
/* ============================================ */

body[data-page="dienstleister"] .meine-layout {
    display: grid;
    grid-template-columns: 16em 1fr;
    gap: 1.5em;
}

body[data-page="dienstleister"] .meine-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="dienstleister"] .sidebar-nachrichten-link {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.625em 0.875em;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 500;
    border-radius: 0.625em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    transition: background 0.2s, border-color 0.2s;
}

body[data-page="dienstleister"] .sidebar-nachrichten-link:hover {
    background: var(--glass-hover);
}

body[data-page="dienstleister"] .sidebar-badge-count {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
    font-size: 0.6875em;
    min-width: 1.25em;
    height: 1.25em;
    line-height: 1.25em;
    text-align: center;
    border-radius: 50%;
    padding: 0 0.25em;
}

body[data-page="dienstleister"] .sidebar-card {
    padding: 1em;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="dienstleister"] .sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

body[data-page="dienstleister"] .sidebar-label {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body[data-page="dienstleister"] .sidebar-select-wrap {
    display: flex;
    gap: 0.375em;
}

body[data-page="dienstleister"] .sidebar-category-select {
    flex: 1;
    min-width: 0;
    padding: 0.5em 0.625em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    max-width: none;
}

body[data-page="dienstleister"] .sidebar-refresh-btn {
    padding: 0.375em;
    min-width: 2em;
    min-height: 2em;
}

/* Source filter toggle */
body[data-page="dienstleister"] .source-toggle {
    display: flex;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    overflow: hidden;
}

body[data-page="dienstleister"] .source-toggle-btn {
    flex: 1;
    padding: 0.375em 0.25em;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

body[data-page="dienstleister"] .source-toggle-btn:hover {
    color: var(--text-primary);
}

body[data-page="dienstleister"] .source-toggle-btn.active {
    background: rgba(var(--accent-warning-rgb, 255, 149, 0), 0.15);
    color: var(--text-primary);
    font-weight: 600;
}

/* Sidebar stats */
body[data-page="dienstleister"] .sidebar-stats {
    flex-direction: row;
    align-items: center;
    gap: 0.5em;
}

body[data-page="dienstleister"] .stat-item {
    display: flex;
    align-items: baseline;
    gap: 0.375em;
}

body[data-page="dienstleister"] .stat-value {
    font-family: var(--font-sans);
    font-size: 1.375em;
    font-weight: 700;
    color: var(--text-primary);
}

body[data-page="dienstleister"] .stat-label {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-tertiary);
}

body[data-page="dienstleister"] .sidebar-new-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375em;
    font-size: 0.8125em;
}

/* Meine content area */
body[data-page="dienstleister"] .meine-content {
    min-width: 0;
}

/* ============================================ */
/*     VENDOR CARD (Meine tab)                  */
/* ============================================ */

body[data-page="dienstleister"] .vendor-cards-grid .vendor-card {
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    padding: 1em;
}

body[data-page="dienstleister"] .vendor-cards-grid .vendor-card:hover {
    border-color: var(--accent-warning, #FF9500);
    box-shadow: 0 0.25em 1em rgba(var(--accent-warning-rgb, 255, 149, 0), 0.1);
}

body[data-page="dienstleister"] .vendor-cards-grid .vendor-card.active {
    border-color: var(--accent-warning, #FF9500);
    box-shadow: 0 0 0 0.125em rgba(var(--accent-warning-rgb, 255, 149, 0), 0.25);
}

/* Vendor card image banner */
body[data-page="dienstleister"] .vendor-card-image {
    margin: -1em -1em 0 -1em;
    height: 8em;
    overflow: hidden;
    border-radius: 0.75em 0.75em 0 0;
}

body[data-page="dienstleister"] .vendor-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Vendor card header */
body[data-page="dienstleister"] .vendor-card-header {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

body[data-page="dienstleister"] .vendor-card-avatar {
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    background: rgba(var(--accent-warning-rgb, 255, 149, 0), 0.15);
    color: var(--accent-warning, #FF9500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 700;
    flex-shrink: 0;
}

body[data-page="dienstleister"] .vendor-card-info {
    flex: 1;
    min-width: 0;
}

body[data-page="dienstleister"] .vendor-card-name {
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="dienstleister"] .vendor-card-category {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Vendor card meta row */
body[data-page="dienstleister"] .vendor-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
}

body[data-page="dienstleister"] .vendor-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125em 0.5em;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    border-radius: 1em;
    background: rgba(var(--accent-warning-rgb, 255, 149, 0), 0.12);
    color: var(--accent-warning, #FF9500);
}

body[data-page="dienstleister"] .vendor-card-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-secondary);
}

body[data-page="dienstleister"] .vendor-card-rating-badge svg {
    color: var(--accent-warning, #FF9500);
}

body[data-page="dienstleister"] .vendor-card-location {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-tertiary);
}

/* ============================================ */
/*     VENDOR EDITOR OVERLAY (Meine tab)        */
/* ============================================ */

body[data-page="dienstleister"] .vendor-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 1000);
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(0.5em);
}

body[data-page="dienstleister"] .vendor-editor-overlay.open {
    display: flex;
}

body[data-page="dienstleister"] .vendor-editor-modal {
    width: 100%;
    max-width: 40em;
    max-height: 90vh;
    overflow-y: auto;
    margin: 1em;
}

/* Image upload section in editor */
body[data-page="dienstleister"] .vendor-image-upload-section {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 1em;
}

body[data-page="dienstleister"] .vendor-image-preview {
    width: 5em;
    height: 5em;
    border-radius: 0.75em;
    overflow: hidden;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body[data-page="dienstleister"] .vendor-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body[data-page="dienstleister"] .vendor-image-placeholder {
    color: var(--text-quaternary);
}

body[data-page="dienstleister"] .vendor-image-actions {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

body[data-page="dienstleister"] .vendor-image-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.75em;
    cursor: pointer;
    transition: background 0.2s;
}

body[data-page="dienstleister"] .vendor-image-upload-btn:hover {
    background: var(--glass-hover);
}

body[data-page="dienstleister"] .vendor-image-remove-btn {
    background: none;
    border: none;
    color: var(--accent-danger, #FF3B30);
    font-family: var(--font-sans);
    font-size: 0.75em;
    cursor: pointer;
    padding: 0.25em 0;
    text-align: left;
}

/* Vendor form grid */
body[data-page="dienstleister"] .vendor-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75em;
}

body[data-page="dienstleister"] .vendor-form-grid .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

body[data-page="dienstleister"] .vendor-form-grid .form-field.full-width {
    grid-column: 1 / -1;
}

body[data-page="dienstleister"] .vendor-form-grid label {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-secondary);
}

body[data-page="dienstleister"] .vendor-form-grid input,
body[data-page="dienstleister"] .vendor-form-grid select,
body[data-page="dienstleister"] .vendor-form-grid textarea {
    padding: 0.5em 0.625em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    max-width: none;
    transition: border-color 0.2s;
}

body[data-page="dienstleister"] .vendor-form-grid input:focus,
body[data-page="dienstleister"] .vendor-form-grid select:focus,
body[data-page="dienstleister"] .vendor-form-grid textarea:focus {
    outline: none;
    border-color: var(--accent-warning, #FF9500);
    box-shadow: 0 0 0 0.125em rgba(var(--accent-warning-rgb, 255, 149, 0), 0.2);
}

/* ============================================ */
/*     TAB: MARKTPLATZ                          */
/* ============================================ */

/* Search bar */
body[data-page="dienstleister"] .marktplatz-search-bar {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1em;
}

body[data-page="dienstleister"] .marktplatz-search-bar input {
    flex: 1;
    padding: 0.625em 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9375em;
    max-width: none;
    transition: border-color 0.2s;
}

body[data-page="dienstleister"] .marktplatz-search-bar input:focus {
    outline: none;
    border-color: var(--accent-warning, #FF9500);
    box-shadow: 0 0 0 0.125em rgba(var(--accent-warning-rgb, 255, 149, 0), 0.2);
}

body[data-page="dienstleister"] .filter-toggle-btn {
    padding: 0.5em 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

body[data-page="dienstleister"] .filter-toggle-btn:hover,
body[data-page="dienstleister"] .filter-toggle-btn.active {
    background: rgba(var(--accent-warning-rgb, 255, 149, 0), 0.1);
    color: var(--accent-warning, #FF9500);
    border-color: var(--accent-warning, #FF9500);
}

/* Filter panel */
body[data-page="dienstleister"] .filter-panel {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(10em, 1fr));
    gap: 0.75em;
    padding: 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    margin-bottom: 1em;
}

body[data-page="dienstleister"] .filter-panel.open {
    display: grid;
}

body[data-page="dienstleister"] .filter-panel .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

body[data-page="dienstleister"] .filter-panel label {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-secondary);
}

body[data-page="dienstleister"] .filter-panel select,
body[data-page="dienstleister"] .filter-panel input {
    padding: 0.5em 0.625em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    max-width: none;
}

body[data-page="dienstleister"] .filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.5em;
}

/* Category pills */
body[data-page="dienstleister"] .category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375em;
    margin-bottom: 1em;
}

body[data-page="dienstleister"] .category-pill {
    padding: 0.375em 0.875em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 1.5em;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

body[data-page="dienstleister"] .category-pill:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="dienstleister"] .category-pill.active {
    background: rgba(var(--accent-warning-rgb, 255, 149, 0), 0.15);
    border-color: var(--accent-warning, #FF9500);
    color: var(--text-primary);
    font-weight: 600;
}

/* Marktplatz vendor card specifics */
body[data-page="dienstleister"] .vendor-cards-grid .vendor-card-accent {
    height: 0.1875em;
    margin: -1em -1em 0.75em -1em;
    border-radius: 0.75em 0.75em 0 0;
    background: linear-gradient(90deg, var(--accent-warning, #FF9500), var(--accent-primary, #FF9500));
}

body[data-page="dienstleister"] .vendor-card-name-row {
    display: flex;
    align-items: center;
    gap: 0.375em;
}

body[data-page="dienstleister"] .vendor-card-verified {
    display: inline-flex;
    color: var(--ios-system-blue, #007AFF);
}

body[data-page="dienstleister"] .vendor-card-verified svg {
    width: 1em;
    height: 1em;
}

/* Vendor card logo */
body[data-page="dienstleister"] .vendor-card-logo {
    width: 2.75em;
    height: 2.75em;
    border-radius: 0.625em;
    overflow: hidden;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body[data-page="dienstleister"] .vendor-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body[data-page="dienstleister"] .vendor-card-logo-placeholder {
    font-family: var(--font-sans);
    font-size: 1em;
    font-weight: 700;
    color: var(--text-tertiary);
}

/* Star rating */
body[data-page="dienstleister"] .vendor-card-rating {
    display: flex;
    align-items: center;
    gap: 0.25em;
}

body[data-page="dienstleister"] .vendor-card-stars {
    display: flex;
    gap: 0.0625em;
}

body[data-page="dienstleister"] .vendor-card-stars svg {
    width: 0.75em;
    height: 0.75em;
}

body[data-page="dienstleister"] .vendor-card-stars .star-filled {
    color: var(--accent-warning, #FF9500);
}

body[data-page="dienstleister"] .vendor-card-stars .star-empty {
    color: var(--text-quaternary);
}

body[data-page="dienstleister"] .vendor-card-review-count {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
}

/* Vendor card body */
body[data-page="dienstleister"] .vendor-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

body[data-page="dienstleister"] .vendor-card-description {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

body[data-page="dienstleister"] .vendor-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em;
}

body[data-page="dienstleister"] .vendor-category-tag {
    display: inline-flex;
    padding: 0.125em 0.5em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 1em;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-secondary);
}

/* Vendor card meta items */
body[data-page="dienstleister"] .vendor-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375em;
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-secondary);
}

body[data-page="dienstleister"] .vendor-card-meta-item svg {
    width: 0.875em;
    height: 0.875em;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

body[data-page="dienstleister"] .vendor-card-meta-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Vendor card footer (action buttons) */
body[data-page="dienstleister"] .vendor-card-footer {
    display: flex;
    gap: 0.5em;
    padding-top: 0.75em;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}

body[data-page="dienstleister"] .save-vendor-btn,
body[data-page="dienstleister"] .contact-vendor-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375em;
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

body[data-page="dienstleister"] .save-vendor-btn:hover,
body[data-page="dienstleister"] .contact-vendor-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="dienstleister"] .save-vendor-btn.saved {
    background: rgba(var(--accent-warning-rgb, 255, 149, 0), 0.12);
    color: var(--accent-warning, #FF9500);
    border-color: rgba(var(--accent-warning-rgb, 255, 149, 0), 0.3);
}

body[data-page="dienstleister"] .save-vendor-btn svg,
body[data-page="dienstleister"] .contact-vendor-btn svg {
    width: 0.875em;
    height: 0.875em;
}

/* Pagination */
body[data-page="dienstleister"] .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    padding: 1em 0;
}

body[data-page="dienstleister"] .pagination-btn {
    padding: 0.375em 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    cursor: pointer;
    transition: background 0.2s;
}

body[data-page="dienstleister"] .pagination-btn:hover:not(:disabled) {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="dienstleister"] .pagination-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

body[data-page="dienstleister"] .pagination-info {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

/* Vendors empty state */
body[data-page="dienstleister"] .vendors-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3em 1em;
}

/* ============================================ */
/*     TAB: AUSSCHREIBUNGEN                     */
/* ============================================ */

body[data-page="dienstleister"] .ausschreibungen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1em;
}

body[data-page="dienstleister"] .ausschreibungen-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20em, 1fr));
    gap: var(--spacing-4, 1em);
}

body[data-page="dienstleister"] .ausschreibung-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 1em;
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    transition: border-color 0.2s, box-shadow 0.2s;
    animation: fadeInTab 0.3s ease both;
}

body[data-page="dienstleister"] .ausschreibung-card:hover {
    border-color: var(--accent-warning, #FF9500);
    box-shadow: 0 0.25em 1em rgba(var(--accent-warning-rgb, 255, 149, 0), 0.1);
}

body[data-page="dienstleister"] .ausschreibung-card[data-urgency="urgent"] {
    border-top: 0.1875em solid var(--accent-warning, #FF9500);
}

body[data-page="dienstleister"] .ausschreibung-card[data-urgency="emergency"] {
    border-top: 0.1875em solid var(--accent-danger, #FF3B30);
}

body[data-page="dienstleister"] .ausschreibung-card.da-has-new-responses {
    box-shadow: 0 0 0 0.125em rgba(var(--accent-warning-rgb, 255, 149, 0), 0.2);
}

/* Ausschreibung card header */
body[data-page="dienstleister"] .ausschreibung-card-header {
    cursor: pointer;
}

body[data-page="dienstleister"] .da-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5em;
}

body[data-page="dienstleister"] .da-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex: 1;
    min-width: 0;
}

body[data-page="dienstleister"] .ausschreibung-card-title {
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="dienstleister"] .da-budget-pill {
    display: inline-flex;
    padding: 0.125em 0.5em;
    background: rgba(var(--accent-warning-rgb, 255, 149, 0), 0.1);
    border-radius: 1em;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--accent-warning, #FF9500);
    white-space: nowrap;
    flex-shrink: 0;
}

body[data-page="dienstleister"] .da-card-actions {
    display: flex;
    gap: 0.25em;
    flex-shrink: 0;
}

/* Info strip (status, category, property, deadline) */
body[data-page="dienstleister"] .da-info-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
}

body[data-page="dienstleister"] .ausschreibung-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em;
}

/* Status & category badges */
body[data-page="dienstleister"] .badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125em 0.5em;
    border-radius: 1em;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
}

body[data-page="dienstleister"] .badge-active {
    background: rgba(52, 199, 89, 0.15);
    color: var(--accent-success, #34C759);
}

body[data-page="dienstleister"] .badge-closed {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
}

body[data-page="dienstleister"] .badge-awarded {
    background: rgba(0, 122, 255, 0.15);
    color: var(--ios-system-blue, #007AFF);
}

body[data-page="dienstleister"] .badge-urgent {
    background: rgba(var(--accent-warning-rgb, 255, 149, 0), 0.15);
    color: var(--accent-warning, #FF9500);
}

body[data-page="dienstleister"] .badge-emergency {
    background: rgba(255, 59, 48, 0.15);
    color: var(--accent-danger, #FF3B30);
}

body[data-page="dienstleister"] .badge-category {
    background: var(--glass-secondary);
    color: var(--text-secondary);
}

/* Property badge and deadline */
body[data-page="dienstleister"] .da-property-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
}

body[data-page="dienstleister"] .da-deadline {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
}

body[data-page="dienstleister"] .da-deadline-critical {
    color: var(--accent-danger, #FF3B30);
}

body[data-page="dienstleister"] .da-deadline-warning {
    color: var(--accent-warning, #FF9500);
}

/* Closed section toggle */
body[data-page="dienstleister"] .closed-section {
    margin-top: 1.5em;
}

body[data-page="dienstleister"] .closed-toggle {
    display: flex;
    align-items: center;
    gap: 0.5em;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5em 0;
    transition: color 0.2s;
}

body[data-page="dienstleister"] .closed-toggle:hover {
    color: var(--text-primary);
}

body[data-page="dienstleister"] .closed-list {
    display: none;
}

body[data-page="dienstleister"] .closed-list.visible {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20em, 1fr));
    gap: var(--spacing-4, 1em);
    margin-top: 1em;
}

/* ============================================ */
/*     EMPTY STATE                              */
/* ============================================ */

body[data-page="dienstleister"] .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3em 1em;
    color: var(--text-tertiary);
}

/* ============================================ */
/*           RESPONSIVE                         */
/* ============================================ */

@media (max-width: 48em) {
    body[data-page="dienstleister"] .dienstleister-page {
        padding: 1.25em 1em;
    }

    body[data-page="dienstleister"] .dienstleister-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75em;
        margin-bottom: 1.25em;
    }

    body[data-page="dienstleister"] .dienstleister-tabs {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1.25em;
    }

    body[data-page="dienstleister"] .dienstleister-tabs button {
        flex: 1;
        text-align: center;
        padding: 0.5em 1em;
    }

    /* Meine: stack sidebar above content on phone */
    body[data-page="dienstleister"] .meine-layout {
        grid-template-columns: 1fr;
    }

    body[data-page="dienstleister"] .meine-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5em;
    }

    body[data-page="dienstleister"] .sidebar-card {
        flex: 1;
        min-width: 0;
    }

    body[data-page="dienstleister"] .sidebar-nachrichten-link {
        flex: 0 0 auto;
    }

    /* Card grids: single column on phone */
    body[data-page="dienstleister"] .vendor-cards-grid,
    body[data-page="dienstleister"] .ausschreibungen-list,
    body[data-page="dienstleister"] .closed-list.visible {
        grid-template-columns: 1fr;
    }

    /* Filter panel: stack */
    body[data-page="dienstleister"] .filter-panel.open {
        grid-template-columns: 1fr;
    }

    /* Editor form: single column on phone */
    body[data-page="dienstleister"] .vendor-form-grid {
        grid-template-columns: 1fr;
    }
}

/**
 * @file vendor-ausschreibungen.css
 * @filepath public/css/pages/vendor-ausschreibungen.css
 * @description Redesigned vendor ausschreibungen browse page.
 *   Premium job-board aesthetic with budget pills, deadline countdowns,
 *   notification-linked highlights, and staggered entrance animations.
 *   Scoped to body[data-page="vendor-ausschreibungen"].
 * @updated 2026-02-14 — Full redesign: 2-col layout, notification states
 * @updated 2026-02-14 — Quote modal, Q&A section, multi-button footer
 */

/* ============================================ */
/*         PAGE HEADER                         */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-page-header {
    margin-bottom: 1.5em;
}

body[data-page="vendor-ausschreibungen"] .va-page-title-row {
    display: flex;
    align-items: center;
    gap: 0.875em;
}

body[data-page="vendor-ausschreibungen"] .va-page-icon {
    font-size: 1.75em;
    color: var(--ios-system-orange);
}

/* ============================================ */
/*         FILTER BAR                          */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-filter-bar {
    padding: 1.25em;
    margin-bottom: 1.5em;
}

body[data-page="vendor-ausschreibungen"] .va-filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 1em;
    align-items: end;
}

body[data-page="vendor-ausschreibungen"] .va-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.3125em;
}

body[data-page="vendor-ausschreibungen"] .va-filter-input,
body[data-page="vendor-ausschreibungen"] .va-filter-select {
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body[data-page="vendor-ausschreibungen"] .va-filter-input::placeholder {
    color: var(--text-quaternary);
}

body[data-page="vendor-ausschreibungen"] .va-filter-input:focus,
body[data-page="vendor-ausschreibungen"] .va-filter-select:focus {
    outline: none;
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.12);
}

body[data-page="vendor-ausschreibungen"] .va-search-wrapper {
    position: relative;
}

body[data-page="vendor-ausschreibungen"] .va-search-icon {
    position: absolute;
    left: 0.75em;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.875em;
    pointer-events: none;
}

body[data-page="vendor-ausschreibungen"] .va-filter-search .va-filter-input {
    padding-left: 0.75em;
}

body[data-page="vendor-ausschreibungen"] .va-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin-top: 0.75em;
}

body[data-page="vendor-ausschreibungen"] .va-filter-reset {
    font-size: 0.8125em;
    padding: 0.3125em 0.75em;
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
}

body[data-page="vendor-ausschreibungen"] .va-filter-count {
    font-weight: 500;
}

/* ============================================ */
/*         STATE CONTAINERS                    */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75em;
    padding: 4em 2em;
    text-align: center;
}

body[data-page="vendor-ausschreibungen"] .va-state-icon {
    font-size: 2.5em;
    color: var(--text-tertiary);
}

body[data-page="vendor-ausschreibungen"] .va-loading-spinner {
    width: 2em;
    height: 2em;
    border: 2px solid var(--glass-border);
    border-top: 2px solid var(--ios-system-orange);
    border-radius: 50%;
    animation: vaSpinner 0.8s linear infinite;
}

@keyframes vaSpinner {
    to { transform: rotate(360deg); }
}

/* ============================================ */
/*         RESULTS GRID — 2 columns            */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25em;
}

body[data-page="vendor-ausschreibungen"] .va-results-info {
    display: flex;
    justify-content: flex-end;
    margin-top: 1em;
    padding: 0 0.25em;
}

/* ============================================ */
/*         CARD — Redesigned                   */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-card {
    position: relative;
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    gap: 0.875em;
    border-left: 0.25em solid var(--glass-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    /* Staggered entrance */
    opacity: 0;
    animation: vaCardEnter 0.4s ease forwards;
}

@keyframes vaCardEnter {
    from {
        opacity: 0;
        transform: translateY(0.75em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body[data-page="vendor-ausschreibungen"] .va-card:hover {
    transform: translateY(-0.1875em);
    box-shadow: 0 0.75em 2em rgba(0, 0, 0, 0.12);
    border-left-color: var(--ios-system-orange);
}

/* --- Urgency accent on left border --- */
body[data-page="vendor-ausschreibungen"] .va-card[data-urgency="urgent"] {
    border-left-color: var(--ios-system-orange);
}

body[data-page="vendor-ausschreibungen"] .va-card[data-urgency="emergency"] {
    border-left-color: var(--ios-system-red);
}

/* ============================================ */
/*         "NEU" BADGE                         */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-badge-new {
    position: absolute;
    top: 1em;
    right: 1em;
    padding: 0.1875em 0.625em;
    border-radius: 0.25em;
    font-size: 0.6875em;
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    box-shadow: 0 0 0.625em rgba(255, 149, 0, 0.4);
}

/* ============================================ */
/*         NOTIFICATION HIGHLIGHT              */
/*  Cards linked from a notification glow      */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-card.va-highlight {
    border-left-color: var(--ios-system-orange);
    box-shadow:
        0 0 0 1px rgba(255, 149, 0, 0.25),
        0 0 1.5em rgba(255, 149, 0, 0.15);
    animation: vaHighlightPulse 2s ease-in-out 2;
}

@keyframes vaHighlightPulse {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(255, 149, 0, 0.25),
            0 0 1.5em rgba(255, 149, 0, 0.15);
    }
    50% {
        box-shadow:
            0 0 0 2px rgba(255, 149, 0, 0.4),
            0 0 2.5em rgba(255, 149, 0, 0.3);
    }
}

/* ============================================ */
/*         CARD HEADER — title + budget pill    */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75em;
}

body[data-page="vendor-ausschreibungen"] .va-card-title {
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

/* Budget pill — prominent, top-right of card */
body[data-page="vendor-ausschreibungen"] .va-budget-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.25em 0.75em;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 700;
    background: rgba(255, 149, 0, 0.12);
    color: var(--ios-system-orange);
    white-space: nowrap;
}

/* ============================================ */
/*         INFO STRIP — location + deadline     */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-info-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625em;
}

/* Location badge */
body[data-page="vendor-ausschreibungen"] .va-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.1875em 0.5em;
    border-radius: 0.375em;
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    background: var(--glass-secondary);
    color: var(--text-secondary);
}

body[data-page="vendor-ausschreibungen"] .va-location-badge .va-canton-tag {
    font-weight: 700;
    color: var(--text-primary);
}

/* Deadline countdown */
body[data-page="vendor-ausschreibungen"] .va-deadline {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-tertiary);
}

body[data-page="vendor-ausschreibungen"] .va-deadline-soon {
    color: var(--ios-system-orange);
}

body[data-page="vendor-ausschreibungen"] .va-deadline-critical {
    color: var(--ios-system-red);
    font-weight: 600;
}

/* Posted date (small, tertiary) */
body[data-page="vendor-ausschreibungen"] .va-posted {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-quaternary);
    margin-left: auto;
}

/* ============================================ */
/*         URGENCY BADGES (inline)             */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-urgency-badge {
    display: inline-flex;
    padding: 0.1875em 0.625em;
    border-radius: 0.75em;
    font-size: 0.6875em;
    font-weight: 700;
    font-family: var(--font-sans);
    white-space: nowrap;
    flex-shrink: 0;
}

body[data-page="vendor-ausschreibungen"] .va-urgency-urgent {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="vendor-ausschreibungen"] .va-urgency-emergency {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
    animation: vaUrgencyPulse 1.5s ease-in-out infinite;
}

@keyframes vaUrgencyPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============================================ */
/*         CATEGORY CHIPS                      */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375em;
}

body[data-page="vendor-ausschreibungen"] .va-category-chip {
    display: inline-flex;
    padding: 0.125em 0.5em;
    border-radius: 0.75em;
    font-size: 0.6875em;
    font-family: var(--font-sans);
    background: var(--glass-secondary);
    color: var(--text-secondary);
    white-space: nowrap;
}

body[data-page="vendor-ausschreibungen"] .va-category-chip-custom {
    border: 1px dashed var(--glass-border);
}

/* ============================================ */
/*         DESCRIPTION                         */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-card-description {
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================ */
/*         ATTACHMENT THUMBNAILS               */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-card-attachments {
    display: flex;
    gap: 0.5em;
}

body[data-page="vendor-ausschreibungen"] .va-attachment-thumb {
    width: 4em;
    height: 3em;
    border-radius: 0.375em;
    object-fit: cover;
    border: 1px solid var(--glass-border);
}

/* ============================================ */
/*         CARD FOOTER — org + responses + CTA */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75em;
    margin-top: auto;
    padding-top: 0.875em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-ausschreibungen"] .va-card-footer-left {
    display: flex;
    align-items: center;
    gap: 0.75em;
    min-width: 0;
    flex: 1;
}

body[data-page="vendor-ausschreibungen"] .va-card-org {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14em;
}

/* Response count pill */
body[data-page="vendor-ausschreibungen"] .va-response-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.125em 0.5em;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    background: var(--glass-secondary);
    color: var(--text-tertiary);
    white-space: nowrap;
}

body[data-page="vendor-ausschreibungen"] .va-response-count-hot {
    background: rgba(255, 149, 0, 0.12);
    color: var(--ios-system-orange);
}

/* Footer actions row — multi-button layout */
body[data-page="vendor-ausschreibungen"] .va-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-shrink: 0;
}

/* CTA button — larger, more prominent */
body[data-page="vendor-ausschreibungen"] .va-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    font-size: 0.9375em;
    font-weight: 600;
    padding: 0.625em 1.5em;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 999px;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

body[data-page="vendor-ausschreibungen"] .va-action-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25em 0.75em rgba(0, 0, 0, 0.12);
}

body[data-page="vendor-ausschreibungen"] .va-responded {
    opacity: 0.5;
    cursor: default;
}

/* Quote button — secondary style */
body[data-page="vendor-ausschreibungen"] .va-quote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    font-size: 0.875em;
    font-weight: 600;
    padding: 0.5em 1.25em;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(255, 149, 0, 0.12);
    color: var(--ios-system-orange);
    border: 1px solid rgba(255, 149, 0, 0.25);
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

body[data-page="vendor-ausschreibungen"] .va-quote-btn:not(:disabled):hover {
    background: rgba(255, 149, 0, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 0.25em 0.75em rgba(255, 149, 0, 0.15);
}

body[data-page="vendor-ausschreibungen"] .va-quote-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Q&A toggle button */
body[data-page="vendor-ausschreibungen"] .va-qa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-size: 0.8125em;
    font-weight: 500;
    padding: 0.375em 0.75em;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--glass-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

body[data-page="vendor-ausschreibungen"] .va-qa-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-ausschreibungen"] .va-qa-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25em;
    height: 1.25em;
    padding: 0 0.25em;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: 700;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

/* ============================================ */
/*         Q&A SECTION (in card)               */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-qa-section {
    display: none;
    padding: 0 1.5em;
    border-top: 1px solid var(--glass-border);
    animation: vaQaSlide 0.25s ease;
}

body[data-page="vendor-ausschreibungen"] .va-qa-section.open {
    display: block;
    padding-top: 1em;
    padding-bottom: 1em;
    margin-top: 0.5em;
}

@keyframes vaQaSlide {
    from { opacity: 0; transform: translateY(-0.25em); }
    to   { opacity: 1; transform: translateY(0); }
}

body[data-page="vendor-ausschreibungen"] .va-qa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75em 0 0.5em;
}

body[data-page="vendor-ausschreibungen"] .va-qa-title {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
}

body[data-page="vendor-ausschreibungen"] .va-qa-list {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    padding-bottom: 0.75em;
}

body[data-page="vendor-ausschreibungen"] .va-qa-entry {
    padding: 0.625em 0.75em;
    border-radius: 0.5em;
    background: var(--glass-secondary);
    border-left: 0.1875em solid var(--ios-system-orange);
}

body[data-page="vendor-ausschreibungen"] .va-qa-entry-own {
    border-left-color: var(--ios-system-green);
}

body[data-page="vendor-ausschreibungen"] .va-qa-author {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--ios-system-orange);
    margin-bottom: 0.25em;
}

body[data-page="vendor-ausschreibungen"] .va-qa-entry-own .va-qa-author {
    color: var(--ios-system-green);
}

body[data-page="vendor-ausschreibungen"] .va-qa-question-text {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-primary);
    line-height: 1.4;
}

body[data-page="vendor-ausschreibungen"] .va-qa-answer {
    margin-top: 0.5em;
    padding-top: 0.5em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-ausschreibungen"] .va-qa-answer-label {
    font-family: var(--font-sans);
    font-size: 0.625em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ios-system-orange);
    margin-bottom: 0.25em;
}

body[data-page="vendor-ausschreibungen"] .va-qa-answer-text {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-secondary);
    line-height: 1.4;
}

body[data-page="vendor-ausschreibungen"] .va-qa-unanswered {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-quaternary);
    font-style: italic;
    margin-top: 0.375em;
}

/* Q&A ask form */
body[data-page="vendor-ausschreibungen"] .va-qa-ask {
    display: flex;
    gap: 0.5em;
    padding: 0.75em 0;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-ausschreibungen"] .va-qa-ask-input {
    flex: 1;
    padding: 0.5em 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    transition: border-color 0.2s;
}

body[data-page="vendor-ausschreibungen"] .va-qa-ask-input::placeholder {
    color: var(--text-quaternary);
}

body[data-page="vendor-ausschreibungen"] .va-qa-ask-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-ausschreibungen"] .va-qa-ask-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em 0.75em;
    border-radius: 0.5em;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border: none;
    cursor: pointer;
    font-size: 0.8125em;
    font-weight: 600;
    transition: opacity 0.15s;
}

body[data-page="vendor-ausschreibungen"] .va-qa-ask-btn:hover {
    opacity: 0.85;
}

body[data-page="vendor-ausschreibungen"] .va-qa-empty {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-quaternary);
    text-align: center;
    padding: 0.75em 0;
}

/* ============================================ */
/*         QUOTE MODAL                         */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-quote-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(0.75em);
    -webkit-backdrop-filter: blur(0.75em);
}

body[data-page="vendor-ausschreibungen"] .va-quote-modal-overlay.open {
    display: flex;
}

body[data-page="vendor-ausschreibungen"] .va-quote-modal {
    width: 100%;
    max-width: 32em;
    margin: 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 1.25em;
    box-shadow: 0 1.5em 4em rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

body[data-page="vendor-ausschreibungen"] .va-quote-modal-accent {
    height: 0.1875em;
    background: linear-gradient(90deg,
        var(--ios-system-orange),
        rgba(255, 149, 0, 0.3),
        transparent);
    border-radius: 1.25em 1.25em 0 0;
}

body[data-page="vendor-ausschreibungen"] .va-quote-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25em 1.5em 0.75em;
}

body[data-page="vendor-ausschreibungen"] .va-quote-modal-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.125em;
    color: var(--text-primary);
}

body[data-page="vendor-ausschreibungen"] .va-quote-modal-close {
    width: 2em;
    height: 2em;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

body[data-page="vendor-ausschreibungen"] .va-quote-modal-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-ausschreibungen"] .va-quote-form {
    display: flex;
    flex-direction: column;
    gap: 0.875em;
    padding: 0.75em 1.5em 1.25em;
}

body[data-page="vendor-ausschreibungen"] .va-quote-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875em;
}

body[data-page="vendor-ausschreibungen"] .va-quote-field {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

body[data-page="vendor-ausschreibungen"] .va-quote-field label {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-secondary);
}

body[data-page="vendor-ausschreibungen"] .va-quote-field input,
body[data-page="vendor-ausschreibungen"] .va-quote-field textarea {
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    transition: border-color 0.2s;
}

body[data-page="vendor-ausschreibungen"] .va-quote-field input:focus,
body[data-page="vendor-ausschreibungen"] .va-quote-field textarea:focus {
    outline: none;
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.12);
}

body[data-page="vendor-ausschreibungen"] .va-quote-field textarea {
    min-height: 4em;
    resize: vertical;
    line-height: 1.4;
}

body[data-page="vendor-ausschreibungen"] .va-quote-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75em;
    padding: 0.75em 1.5em 1.25em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-ausschreibungen"] .va-quote-cancel {
    padding: 0.5em 1em;
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    cursor: pointer;
    transition: all 0.15s;
}

body[data-page="vendor-ausschreibungen"] .va-quote-cancel:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-ausschreibungen"] .va-quote-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 1.25em;
    border: none;
    border-radius: 0.5em;
    background: linear-gradient(135deg, var(--ios-system-orange), rgba(255, 149, 0, 0.85));
    color: var(--button-text-on-color);
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0.125em 0.5em rgba(255, 149, 0, 0.25);
}

body[data-page="vendor-ausschreibungen"] .va-quote-submit:hover {
    box-shadow: 0 0.25em 1em rgba(255, 149, 0, 0.35);
    transform: translateY(-1px);
}

body[data-page="vendor-ausschreibungen"] .va-quote-submit:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

/* ============================================ */
/*         QUOTE SENT BUTTON                   */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-quote-sent {
    background: rgba(52, 199, 89, 0.12);
    color: var(--ios-system-green);
    border-color: rgba(52, 199, 89, 0.25);
    cursor: pointer;
}

body[data-page="vendor-ausschreibungen"] .va-quote-sent:hover {
    background: rgba(52, 199, 89, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 0.25em 0.75em rgba(52, 199, 89, 0.15);
}

/* ============================================ */
/*         QUOTE DETAIL MODAL                  */
/*   Mirrors vendor-auftraege detail modal     */
/* ============================================ */

body[data-page="vendor-ausschreibungen"] .va-quote-detail-modal {
    max-width: 43.75em;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: vaQuoteDetailEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vaQuoteDetailEnter {
    from { opacity: 0; transform: translateY(2em); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Title row with status pill */
body[data-page="vendor-ausschreibungen"] .va-quote-detail-title-row {
    display: flex;
    align-items: center;
    gap: 0.625em;
    flex-wrap: wrap;
}

/* Status pill */
body[data-page="vendor-ausschreibungen"] .va-quote-detail-status {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.6875em;
    padding: 0.2em 0.625em;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body[data-page="vendor-ausschreibungen"] .va-quote-status-sent {
    background: rgba(0, 122, 255, 0.12);
    color: var(--ios-system-blue);
}

body[data-page="vendor-ausschreibungen"] .va-quote-status-accepted {
    background: rgba(52, 199, 89, 0.12);
    color: var(--ios-system-green);
}

body[data-page="vendor-ausschreibungen"] .va-quote-status-rejected {
    background: rgba(255, 59, 48, 0.12);
    color: var(--ios-system-red);
}

body[data-page="vendor-ausschreibungen"] .va-quote-status-withdrawn {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
}

body[data-page="vendor-ausschreibungen"] .va-quote-status-draft {
    background: var(--glass-secondary);
    color: var(--text-secondary);
}

/* Scrollable body */
body[data-page="vendor-ausschreibungen"] .va-quote-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25em 1.5em;
}

/* Sections */
body[data-page="vendor-ausschreibungen"] .va-quote-detail-section {
    margin-bottom: 1.25em;
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-section:last-child {
    margin-bottom: 0;
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-section-title {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.625em;
}

/* 2-column info grid */
body[data-page="vendor-ausschreibungen"] .va-quote-detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875em;
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.125em;
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-info-label {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-info-value {
    font-family: var(--font-sans);
    font-size: 0.9375em;
    color: var(--text-primary);
}

/* Description text */
body[data-page="vendor-ausschreibungen"] .va-quote-detail-description {
    font-family: var(--font-sans);
    font-size: 0.875em;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Line items table */
body[data-page="vendor-ausschreibungen"] .va-quote-detail-items-table {
    width: 100%;
    border-collapse: collapse;
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-items-table th {
    text-align: left;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.625em 0.5em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-items-table th:last-child {
    text-align: right;
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-items-table td {
    padding: 0.625em 0.5em;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-items-table td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-items-table .item-optional {
    color: var(--text-tertiary);
    font-style: italic;
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-items-table .item-description {
    font-size: 0.8125em;
    color: var(--text-secondary);
}

/* Totals */
body[data-page="vendor-ausschreibungen"] .va-quote-detail-totals {
    margin-top: 0.875em;
    padding-top: 0.875em;
    border-top: 2px solid var(--glass-border);
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25em 0;
    font-family: var(--font-sans);
    font-size: 0.875em;
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-total-label {
    color: var(--text-secondary);
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-total-value {
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-total-row.grand-total {
    font-weight: 700;
    font-size: 1.0625em;
    color: var(--ios-system-orange);
    padding-top: 0.5em;
    margin-top: 0.25em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-ausschreibungen"] .va-quote-detail-total-row.grand-total .va-quote-detail-total-value {
    color: var(--ios-system-orange);
}

/* Withdraw button — red-tinted */
body[data-page="vendor-ausschreibungen"] .va-quote-withdraw-btn {
    background: linear-gradient(135deg, var(--ios-system-red), rgba(255, 59, 48, 0.85));
    box-shadow: 0 0.125em 0.5em rgba(255, 59, 48, 0.25);
}

body[data-page="vendor-ausschreibungen"] .va-quote-withdraw-btn:hover {
    box-shadow: 0 0.25em 1em rgba(255, 59, 48, 0.35);
}

@media (max-width: 30em) {
    body[data-page="vendor-ausschreibungen"] .va-quote-detail-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================ */
/*         RESPONSIVE                          */
/* ============================================ */

@media (max-width: 75em) {
    body[data-page="vendor-ausschreibungen"] .va-results-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-ausschreibungen"] .va-filter-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 48em) {
    body[data-page="vendor-ausschreibungen"] .va-results-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-ausschreibungen"] .va-filter-row {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-ausschreibungen"] .va-card {
        padding: 1.25em;
    }

    body[data-page="vendor-ausschreibungen"] .va-budget-pill {
        font-size: 0.75em;
    }

    body[data-page="vendor-ausschreibungen"] .va-card-footer {
        flex-wrap: wrap;
    }

    body[data-page="vendor-ausschreibungen"] .va-card-actions {
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-end;
    }

    body[data-page="vendor-ausschreibungen"] .va-quote-form-row {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-ausschreibungen"] .va-quote-modal {
        max-width: none;
        margin: 0.5em;
    }

    body[data-page="vendor-ausschreibungen"] .va-qa-section {
        padding: 0 1.25em;
    }
}

/**
 * @file vendor-auftraege.css
 * @filepath public/css/pages/vendor-auftraege.css
 * @description Auftrags-Lifecycle Kanban board — 5-stage pipeline from quote to completion.
 *   "Warm Swiss Precision" aesthetic: editorial gridlines, Noto Serif headings,
 *   sunset orange accent palette. Zero blue policy.
 *   Scoped to body[data-page="vendor-auftraege"].
 * @created 2026-02-14
 *
 * STAGES: Angebote | Geplant | Laufend | Abschliessen | Abgeschlossen
 * PALETTE: Sunset warm gradient left→right, green for done
 * RESPONSIVE: <48em → horizontal tab switcher + single column
 * @updated 2026-03-04 — Added timeline (Gantt), calendar (FullCalendar), view switcher, employee chips
 */

/* ============================================ */
/*         SUNSET ACCENT PALETTE               */
/*   Page-scoped — does NOT modify globals     */
/* ============================================ */

body[data-page="vendor-auftraege"] {
    --sunset-warm: #F26419;
    --sunset-glow: #FF8C42;
    --sunset-deep: #E55100;
    --sunset-amber: #FFAE42;
    --sunset-ember: #D4451A;
    --sunset-rgb: 242, 100, 25;
    --sunset-glow-rgb: 255, 140, 66;
    --sunset-amber-rgb: 255, 174, 66;

    /* Stage colors */
    --stage-angebote: #FFAE42;
    --stage-geplant: #FF8C42;
    --stage-laufend: #F26419;
    --stage-abschliessen: #E55100;
    --stage-abgeschlossen: var(--ios-system-green, #34C759);
}

/* ============================================ */
/*         PAGE LAYOUT                         */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-page {
    min-height: 100vh;
    padding: 1.5em;
    padding-left: calc(4em + 1.5em); /* account for menubar width */
    display: flex;
    flex-direction: column;
}

/* ============================================ */
/*         PAGE HEADER                         */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    margin-bottom: 1.5em;
}

body[data-page="vendor-auftraege"] .vau-header-left {
    display: flex;
    align-items: center;
    gap: 1em;
}

body[data-page="vendor-auftraege"] .vau-back-btn {
    display: flex;
    align-items: center;
    gap: 0.375em;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.375em 0.625em;
    border-radius: 0.5em;
    font-family: var(--font-sans);
    font-size: 0.875em;
    transition: color 0.2s, background 0.2s;
}

body[data-page="vendor-auftraege"] .vau-back-btn:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
}

body[data-page="vendor-auftraege"] .vau-back-btn [data-icon] {
    font-size: 1.125em;
}

body[data-page="vendor-auftraege"] .vau-page-title {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

body[data-page="vendor-auftraege"] .vau-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

body[data-page="vendor-auftraege"] .vau-new-quote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 1.25em;
    border: none;
    border-radius: 999px;
    background: var(--sunset-warm);
    color: var(--button-text-on-color);
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 0.125em 0.5em rgba(var(--sunset-rgb), 0.25);
}

body[data-page="vendor-auftraege"] .vau-new-quote-btn:hover {
    background: var(--sunset-glow);
    transform: translateY(-1px);
    box-shadow: 0 0.25em 1em rgba(var(--sunset-rgb), 0.35);
}

body[data-page="vendor-auftraege"] .vau-new-quote-btn [data-icon] {
    font-size: 1em;
}

/* ============================================ */
/*         SEARCH BAR                          */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    margin-bottom: 1.25em;
}

body[data-page="vendor-auftraege"] .vau-search-bar {
    max-width: 25em;
    flex: 1;
}

body[data-page="vendor-auftraege"] .vau-search-input {
    width: 100%;
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.625em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body[data-page="vendor-auftraege"] .vau-search-input::placeholder {
    color: var(--text-quaternary);
}

body[data-page="vendor-auftraege"] .vau-search-input:focus {
    outline: none;
    border-color: var(--sunset-warm);
    box-shadow: 0 0 0 3px rgba(var(--sunset-rgb), 0.15);
}

body[data-page="vendor-auftraege"] .vau-search-wrapper {
    position: relative;
}

body[data-page="vendor-auftraege"] .vau-search-icon {
    position: absolute;
    left: 0.75em;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    width: 1em;
    height: 1em;
    pointer-events: none;
}

/* ============================================ */
/*         MOBILE TAB SWITCHER                 */
/*   Hidden on desktop, shows as tab bar <48em */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-mobile-tabs {
    display: none;
    overflow-x: auto;
    gap: 0.25em;
    margin-bottom: 1em;
    padding-bottom: 0.25em;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

body[data-page="vendor-auftraege"] .vau-mobile-tabs::-webkit-scrollbar {
    display: none;
}

body[data-page="vendor-auftraege"] .vau-mobile-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 1em;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-primary);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

body[data-page="vendor-auftraege"] .vau-mobile-tab.active {
    color: var(--button-text-on-color);
    border-color: transparent;
}

body[data-page="vendor-auftraege"] .vau-mobile-tab[data-stage="angebote"].active {
    background: var(--stage-angebote);
}

body[data-page="vendor-auftraege"] .vau-mobile-tab[data-stage="geplant"].active {
    background: var(--stage-geplant);
}

body[data-page="vendor-auftraege"] .vau-mobile-tab[data-stage="laufend"].active {
    background: var(--stage-laufend);
}

body[data-page="vendor-auftraege"] .vau-mobile-tab[data-stage="abschliessen"].active {
    background: var(--stage-abschliessen);
}

body[data-page="vendor-auftraege"] .vau-mobile-tab[data-stage="abgeschlossen"].active {
    background: var(--stage-abgeschlossen);
}

body[data-page="vendor-auftraege"] .vau-mobile-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25em;
    height: 1.25em;
    padding: 0 0.25em;
    border-radius: 50%;
    font-size: 0.85em;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.15);
    color: inherit;
}

/* ============================================ */
/*         KANBAN BOARD                        */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-kanban {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1em;
    flex: 1;
    min-height: 0;
    align-items: start;
}

/* ============================================ */
/*         KANBAN COLUMN                       */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-kanban-col {
    display: flex;
    flex-direction: column;
    min-height: 20em;
    border-radius: 0.75em;
    background: var(--glass-primary);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

/* ============================================ */
/*         COLUMN HEADER                       */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875em 1em;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-secondary);
}

body[data-page="vendor-auftraege"] .vau-col-label {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

body[data-page="vendor-auftraege"] .vau-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    height: 1.5em;
    padding: 0 0.25em;
    border-radius: 50%;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 700;
    color: var(--button-text-on-color);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body[data-page="vendor-auftraege"] .vau-count.bounce {
    transform: scale(1.15);
}

/* Count pill colors per stage */
body[data-page="vendor-auftraege"] .vau-kanban-col[data-stage="angebote"] .vau-count {
    background: var(--stage-angebote);
}

body[data-page="vendor-auftraege"] .vau-kanban-col[data-stage="geplant"] .vau-count {
    background: var(--stage-geplant);
}

body[data-page="vendor-auftraege"] .vau-kanban-col[data-stage="laufend"] .vau-count {
    background: var(--stage-laufend);
}

body[data-page="vendor-auftraege"] .vau-kanban-col[data-stage="abschliessen"] .vau-count {
    background: var(--stage-abschliessen);
}

body[data-page="vendor-auftraege"] .vau-kanban-col[data-stage="abgeschlossen"] .vau-count {
    background: var(--stage-abgeschlossen);
}

/* ============================================ */
/*         KANBAN CARDS CONTAINER              */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-kanban-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.625em;
    padding: 0.75em;
    overflow-y: auto;
    min-height: 0;
}

/* ============================================ */
/*         CARD BASE                           */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-card {
    position: relative;
    padding: 1em;
    border-radius: 0.625em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--glass-border);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    /* Staggered entrance */
    opacity: 0;
    animation: vauCardEnter 0.35s ease-out forwards;
    animation-delay: calc(var(--card-index, 0) * 60ms);
}

@keyframes vauCardEnter {
    from {
        opacity: 0;
        transform: translateY(1em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body[data-page="vendor-auftraege"] .vau-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5em 1.5em rgba(var(--sunset-rgb), 0.12);
}

/* Stage-specific left border colors */
body[data-page="vendor-auftraege"] .vau-kanban-col[data-stage="angebote"] .vau-card {
    border-left-color: var(--stage-angebote);
}

body[data-page="vendor-auftraege"] .vau-kanban-col[data-stage="geplant"] .vau-card {
    border-left-color: var(--stage-geplant);
}

body[data-page="vendor-auftraege"] .vau-kanban-col[data-stage="laufend"] .vau-card {
    border-left-color: var(--stage-laufend);
}

body[data-page="vendor-auftraege"] .vau-kanban-col[data-stage="abschliessen"] .vau-card {
    border-left-color: var(--stage-abschliessen);
}

body[data-page="vendor-auftraege"] .vau-kanban-col[data-stage="abgeschlossen"] .vau-card {
    border-left-color: var(--stage-abgeschlossen);
}

/* ============================================ */
/*         CARD TOP META (source + quote #)    */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-card-top-meta {
    display: flex;
    align-items: center;
    gap: 0.375em;
    margin-bottom: 0.375em;
}

body[data-page="vendor-auftraege"] .vau-card-source {
    display: inline-flex;
    align-items: center;
    padding: 0.0625em 0.375em;
    border-radius: 0.25em;
    font-family: var(--font-sans);
    font-size: 0.5625em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body[data-page="vendor-auftraege"] .vau-card-source-ausschreibung {
    background: rgba(var(--sunset-rgb), 0.12);
    color: var(--sunset-warm);
}

body[data-page="vendor-auftraege"] .vau-card-source-conversation {
    background: rgba(var(--sunset-glow-rgb), 0.12);
    color: var(--sunset-glow);
}

body[data-page="vendor-auftraege"] .vau-card-source-optional {
    background: rgba(var(--sunset-amber-rgb), 0.12);
    color: var(--sunset-amber);
}

body[data-page="vendor-auftraege"] .vau-card-quote-number {
    font-family: var(--font-sans);
    font-size: 0.5625em;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}

/* ============================================ */
/*         CARD CONTENT                        */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5em;
    margin-bottom: 0.5em;
}

body[data-page="vendor-auftraege"] .vau-card-title {
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body[data-page="vendor-auftraege"] .vau-card-budget {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 0.1875em 0.5em;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 700;
    background: rgba(var(--sunset-amber-rgb), 0.12);
    color: var(--sunset-deep);
    white-space: nowrap;
}

body[data-page="vendor-auftraege"] .vau-card-owner {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-secondary);
    margin-bottom: 0.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-page="vendor-auftraege"] .vau-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5em;
    margin-bottom: 0.625em;
}

body[data-page="vendor-auftraege"] .vau-card-items-count,
body[data-page="vendor-auftraege"] .vau-card-location,
body[data-page="vendor-auftraege"] .vau-card-date {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.25em;
}

body[data-page="vendor-auftraege"] .vau-card-items-count [data-icon],
body[data-page="vendor-auftraege"] .vau-card-location [data-icon],
body[data-page="vendor-auftraege"] .vau-card-date [data-icon] {
    font-size: 0.875em;
}

/* ============================================ */
/*         CARD ACTIONS                        */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-card-actions {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding-top: 0.625em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-auftraege"] .vau-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.3125em 0.625em;
    border-radius: 0.375em;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-secondary);
    text-decoration: none;
}

body[data-page="vendor-auftraege"] .vau-card-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .vau-card-btn-primary {
    background: var(--sunset-warm);
    border-color: var(--sunset-warm);
    color: var(--button-text-on-color);
}

body[data-page="vendor-auftraege"] .vau-card-btn-primary:hover {
    background: var(--sunset-glow);
    border-color: var(--sunset-glow);
    color: var(--button-text-on-color);
}

body[data-page="vendor-auftraege"] .vau-card-btn-success {
    background: var(--ios-system-green, #34C759);
    border-color: var(--ios-system-green, #34C759);
    color: var(--button-text-on-color);
}

body[data-page="vendor-auftraege"] .vau-card-btn-success:hover {
    filter: brightness(1.1);
    color: var(--button-text-on-color);
}

body[data-page="vendor-auftraege"] .vau-card-btn [data-icon] {
    font-size: 0.875em;
}

/* ============================================ */
/*         STATUS PILL (on card)               */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.125em 0.5em;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.625em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body[data-page="vendor-auftraege"] .vau-status-pill.draft {
    background: rgba(var(--sunset-amber-rgb), 0.15);
    color: var(--sunset-amber);
}

body[data-page="vendor-auftraege"] .vau-status-pill.sent {
    background: rgba(var(--sunset-rgb), 0.15);
    color: var(--sunset-warm);
}

body[data-page="vendor-auftraege"] .vau-status-pill.accepted {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green, #34C759);
}

body[data-page="vendor-auftraege"] .vau-status-pill.rejected {
    background: rgba(255, 59, 48, 0.12);
    color: var(--ios-system-red, #FF3B30);
}

body[data-page="vendor-auftraege"] .vau-status-pill.expired {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
}

/* Expired date value in modal */
body[data-page="vendor-auftraege"] .vau-detail-info-value.expired {
    color: var(--sunset-ember);
}

/* ============================================ */
/*         COLUMN EMPTY STATE                  */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-col-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2em 1em;
    text-align: center;
    color: var(--text-tertiary);
    gap: 0.5em;
}

body[data-page="vendor-auftraege"] .vau-col-empty [data-icon] {
    font-size: 1.75em;
    opacity: 0.6;
}

body[data-page="vendor-auftraege"] .vau-col-empty-text {
    font-family: var(--font-sans);
    font-size: 0.75em;
    line-height: 1.4;
}

/* ============================================ */
/*         LOADING STATE                       */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4em 2em;
    gap: 0.75em;
}

body[data-page="vendor-auftraege"] .vau-loading-spinner {
    width: 1.5em;
    height: 1.5em;
    border: 2px solid var(--glass-border);
    border-top-color: var(--sunset-warm);
    border-radius: 50%;
    animation: vauSpin 0.8s linear infinite;
}

@keyframes vauSpin {
    to { transform: rotate(360deg); }
}

body[data-page="vendor-auftraege"] .vau-loading-text {
    font-family: var(--font-sans);
    font-size: 0.875em;
    color: var(--text-tertiary);
}

/* ============================================ */
/*         JOB DETAIL MODAL                    */
/*   Reused from existing, restyled for sunset */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(0.5em);
    -webkit-backdrop-filter: blur(0.5em);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5em;
    /* Promote child glass-card to modal-level opacity */
    --_glass-card-bg: var(--glass-modal-bg);
    --_glass-card-blur: blur(40px);
}

body[data-page="vendor-auftraege"] .vau-detail-overlay.open {
    display: flex;
}

body[data-page="vendor-auftraege"] .vau-detail-modal {
    width: 100%;
    max-width: 43.75em;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: vauModalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vauModalEnter {
    from {
        opacity: 0;
        transform: translateY(2em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body[data-page="vendor-auftraege"] .vau-detail-accent {
    height: 3px;
    background: linear-gradient(90deg,
        var(--sunset-warm),
        var(--sunset-glow),
        transparent);
    border-radius: 0.75em 0.75em 0 0;
}

body[data-page="vendor-auftraege"] .vau-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25em 1.5em 0.75em;
}

body[data-page="vendor-auftraege"] .vau-detail-title-row {
    display: flex;
    align-items: center;
    gap: 0.625em;
    flex-wrap: wrap;
}

body[data-page="vendor-auftraege"] .vau-detail-title {
    font-family: var(--font-serif);
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

body[data-page="vendor-auftraege"] .vau-detail-close {
    width: 2em;
    height: 2em;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

body[data-page="vendor-auftraege"] .vau-detail-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .vau-detail-content {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 1.25em 1.5em;
}

body[data-page="vendor-auftraege"] .vau-detail-section {
    margin-bottom: 1.25em;
}

body[data-page="vendor-auftraege"] .vau-detail-section:last-child {
    margin-bottom: 0;
}

body[data-page="vendor-auftraege"] .vau-detail-section-title {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.625em;
}

body[data-page="vendor-auftraege"] .vau-detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875em;
}

body[data-page="vendor-auftraege"] .vau-detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.125em;
}

body[data-page="vendor-auftraege"] .vau-detail-info-label {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
}

body[data-page="vendor-auftraege"] .vau-detail-info-value {
    font-family: var(--font-sans);
    font-size: 0.9375em;
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .vau-detail-description {
    font-family: var(--font-sans);
    font-size: 0.875em;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Line items table */
body[data-page="vendor-auftraege"] .vau-detail-items {
    width: 100%;
    border-collapse: collapse;
}

body[data-page="vendor-auftraege"] .vau-detail-items th {
    text-align: left;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.625em 0.5em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-auftraege"] .vau-detail-items th:last-child {
    text-align: right;
}

body[data-page="vendor-auftraege"] .vau-detail-items td {
    padding: 0.625em 0.5em;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
}

body[data-page="vendor-auftraege"] .vau-detail-items td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body[data-page="vendor-auftraege"] .vau-detail-items .item-optional {
    color: var(--text-tertiary);
    font-style: italic;
}

body[data-page="vendor-auftraege"] .vau-detail-items .item-description {
    font-size: 0.8125em;
    color: var(--text-secondary);
}

/* Totals */
body[data-page="vendor-auftraege"] .vau-detail-totals {
    margin-top: 0.875em;
    padding-top: 0.875em;
    border-top: 2px solid var(--glass-border);
}

body[data-page="vendor-auftraege"] .vau-detail-total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25em 0;
    font-family: var(--font-sans);
    font-size: 0.875em;
}

body[data-page="vendor-auftraege"] .vau-detail-total-row.grand-total {
    font-weight: 700;
    font-size: 1.0625em;
    color: var(--sunset-deep);
    padding-top: 0.5em;
    margin-top: 0.25em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-auftraege"] .vau-detail-total-label {
    color: var(--text-secondary);
}

body[data-page="vendor-auftraege"] .vau-detail-total-value {
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .vau-detail-total-row.grand-total .vau-detail-total-value {
    color: var(--sunset-deep);
}

/* Footer buttons */
body[data-page="vendor-auftraege"] .vau-detail-footer {
    display: flex;
    gap: 0.625em;
    padding: 1em 1.5em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-auftraege"] .vau-detail-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375em;
    padding: 0.625em 1em;
    border-radius: 0.5em;
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

body[data-page="vendor-auftraege"] .vau-detail-btn [data-icon] {
    font-size: 1.125em;
}

body[data-page="vendor-auftraege"] .vau-detail-btn-secondary {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

body[data-page="vendor-auftraege"] .vau-detail-btn-secondary:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .vau-detail-btn-primary {
    background: var(--sunset-warm);
    border: 1px solid var(--sunset-warm);
    color: var(--button-text-on-color);
    box-shadow: 0 0.125em 0.5em rgba(var(--sunset-rgb), 0.2);
}

body[data-page="vendor-auftraege"] .vau-detail-btn-primary:hover {
    background: var(--sunset-glow);
    border-color: var(--sunset-glow);
    box-shadow: 0 0.25em 0.75em rgba(var(--sunset-rgb), 0.3);
}

body[data-page="vendor-auftraege"] .vau-detail-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body[data-page="vendor-auftraege"] .vau-detail-btn-success {
    background: var(--ios-system-green, #34C759);
    border: 1px solid var(--ios-system-green, #34C759);
    color: var(--button-text-on-color);
}

body[data-page="vendor-auftraege"] .vau-detail-btn-success:hover {
    filter: brightness(1.1);
}

/* ============================================ */
/*         EXECUTION TABS (Fotos, Unterschrift) */
/*   Shown in Laufend + Abschliessen stages    */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-exec-tabs {
    display: flex;
    gap: 0;
    margin-top: 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-auftraege"] .vau-exec-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.625em 1.25em;
    border: none;
    background: none;
    color: var(--text-tertiary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

body[data-page="vendor-auftraege"] .vau-exec-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.25s, transform 0.25s;
    transform: scaleX(0);
    border-radius: 2px 2px 0 0;
}

body[data-page="vendor-auftraege"] .vau-exec-tab:hover {
    color: var(--text-secondary);
}

body[data-page="vendor-auftraege"] .vau-exec-tab.active {
    color: var(--sunset-warm);
}

body[data-page="vendor-auftraege"] .vau-exec-tab.active::after {
    background: var(--sunset-warm);
    transform: scaleX(1);
}

body[data-page="vendor-auftraege"] .vau-exec-tab [data-icon] {
    font-size: 1em;
}

/* Panel container */
body[data-page="vendor-auftraege"] .vau-exec-panel {
    padding-top: 1em;
}

/* ============================================ */
/*         PHOTO UPLOAD + GRID                 */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-photo-upload {
    margin-bottom: 1em;
}

body[data-page="vendor-auftraege"] .vau-photo-btn-row {
    display: flex;
    gap: 0.5em;
}

body[data-page="vendor-auftraege"] .vau-photo-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.625em 1.25em;
    border: 1.5px dashed rgba(var(--sunset-rgb), 0.4);
    border-radius: 0.625em;
    background: rgba(var(--sunset-rgb), 0.04);
    color: var(--sunset-warm);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}

body[data-page="vendor-auftraege"] .vau-photo-camera-btn {
    border-style: solid;
    background: rgba(var(--sunset-rgb), 0.1);
}

body[data-page="vendor-auftraege"] .vau-photo-upload-btn:hover {
    background: rgba(var(--sunset-rgb), 0.08);
    border-color: var(--sunset-warm);
}

body[data-page="vendor-auftraege"] .vau-photo-camera-btn:hover {
    background: rgba(var(--sunset-rgb), 0.16);
}

body[data-page="vendor-auftraege"] .vau-photo-upload-btn [data-icon] {
    font-size: 1.125em;
}

body[data-page="vendor-auftraege"] .vau-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5em;
}

body[data-page="vendor-auftraege"] .vau-photo-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

body[data-page="vendor-auftraege"] .vau-photo-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 0.375em 1em rgba(var(--sunset-rgb), 0.15);
}

body[data-page="vendor-auftraege"] .vau-photo-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1.5em 1em;
    color: var(--text-quaternary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-style: italic;
}

/* ============================================ */
/*         CAMERA MODAL                        */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-camera-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
}

body[data-page="vendor-auftraege"] .vau-camera-modal {
    background: var(--glass-primary);
    backdrop-filter: blur(2.5em);
    -webkit-backdrop-filter: blur(2.5em);
    border: 1px solid var(--glass-border);
    border-radius: 1em;
    width: 100%;
    max-width: 40em;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body[data-page="vendor-auftraege"] .vau-camera-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75em 1em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-auftraege"] .vau-camera-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5em;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25em;
}

body[data-page="vendor-auftraege"] .vau-camera-close:hover {
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .vau-camera-video,
body[data-page="vendor-auftraege"] .vau-camera-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
    display: block;
}

body[data-page="vendor-auftraege"] .vau-camera-controls {
    display: flex;
    justify-content: center;
    padding: 1em;
}

body[data-page="vendor-auftraege"] .vau-camera-snap-btn {
    width: 4em;
    height: 4em;
    border-radius: 50%;
    border: 3px solid var(--sunset-warm);
    background: rgba(var(--sunset-rgb), 0.15);
    color: var(--sunset-warm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25em;
    transition: all 0.2s;
}

body[data-page="vendor-auftraege"] .vau-camera-snap-btn:hover {
    background: rgba(var(--sunset-rgb), 0.3);
    transform: scale(1.05);
}

body[data-page="vendor-auftraege"] .vau-camera-actions {
    display: flex;
    gap: 0.5em;
    padding: 0 1em 1em;
}

/* ============================================ */
/*         SIGNATURE PAD                       */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-signature-wrap {
    border: 1px solid var(--glass-border);
    border-radius: 0.625em;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

body[data-page="vendor-auftraege"] .vau-signature-canvas {
    display: block;
    width: 100%;
    height: 9em;
    cursor: crosshair;
    touch-action: none;
}

body[data-page="vendor-auftraege"] .vau-signature-name {
    margin-top: 0.875em;
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

body[data-page="vendor-auftraege"] .vau-signature-name label {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-tertiary);
}

body[data-page="vendor-auftraege"] .vau-signature-input {
    width: 100%;
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body[data-page="vendor-auftraege"] .vau-signature-input::placeholder {
    color: var(--text-quaternary);
}

body[data-page="vendor-auftraege"] .vau-signature-input:focus {
    outline: none;
    border-color: var(--sunset-warm);
    box-shadow: 0 0 0 3px rgba(var(--sunset-rgb), 0.15);
}

body[data-page="vendor-auftraege"] .vau-signature-actions {
    margin-top: 0.625em;
    display: flex;
    justify-content: flex-end;
}

body[data-page="vendor-auftraege"] .vau-signature-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.375em 0.75em;
    border: 1px solid rgba(212, 69, 26, 0.3);
    border-radius: 0.375em;
    background: rgba(212, 69, 26, 0.08);
    color: var(--sunset-ember);
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

body[data-page="vendor-auftraege"] .vau-signature-clear:hover {
    background: rgba(212, 69, 26, 0.15);
    border-color: var(--sunset-ember);
}

/* ============================================ */
/*         COMPLETION FORM (Phase 6)           */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-completion-form {
    display: flex;
    flex-direction: column;
    gap: 1.25em;
}

/* Comparison table input */
body[data-page="vendor-auftraege"] .vau-comparison-table .vau-comp-input {
    width: 5em;
    padding: 0.3125em 0.5em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.375em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-variant-numeric: tabular-nums;
    text-align: center;
    transition: border-color 0.2s;
}

body[data-page="vendor-auftraege"] .vau-comparison-table .vau-comp-input:focus {
    outline: none;
    border-color: var(--sunset-warm);
    box-shadow: 0 0 0 2px rgba(var(--sunset-rgb), 0.12);
}

/* Textarea */
body[data-page="vendor-auftraege"] .vau-comp-textarea {
    width: 100%;
    padding: 0.625em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    line-height: 1.5;
    resize: vertical;
    min-height: 4.5em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body[data-page="vendor-auftraege"] .vau-comp-textarea::placeholder {
    color: var(--text-quaternary);
}

body[data-page="vendor-auftraege"] .vau-comp-textarea:focus {
    outline: none;
    border-color: var(--sunset-warm);
    box-shadow: 0 0 0 3px rgba(var(--sunset-rgb), 0.15);
}

/* Hours input (standalone) */
body[data-page="vendor-auftraege"] .vau-comp-hours-input {
    width: 8em;
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.2s;
}

body[data-page="vendor-auftraege"] .vau-comp-hours-input:focus {
    outline: none;
    border-color: var(--sunset-warm);
    box-shadow: 0 0 0 3px rgba(var(--sunset-rgb), 0.15);
}

/* Completion action buttons */
body[data-page="vendor-auftraege"] .vau-comp-actions {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
    margin-top: 0.5em;
    padding-top: 1em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-auftraege"] .vau-comp-action-btn {
    flex: 1;
    justify-content: center;
}

@media (max-width: 30em) {
    body[data-page="vendor-auftraege"] .vau-comp-actions {
        flex-direction: column;
    }

    body[data-page="vendor-auftraege"] .vau-comp-action-btn {
        width: 100%;
    }
}

/* ============================================ */
/*         HOURS SUMMARY + BILLABLE            */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-hours-summary {
    padding: 0.875em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
}

body[data-page="vendor-auftraege"] .vau-hours-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

body[data-page="vendor-auftraege"] .vau-hours-summary-label {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-secondary);
}

body[data-page="vendor-auftraege"] .vau-hours-summary-total {
    font-family: var(--font-sans);
    font-size: 1.125em;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .vau-hours-breakdown {
    margin-top: 0.5em;
    padding-top: 0.5em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-auftraege"] .vau-hours-employee-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25em 0;
    font-size: 0.8125em;
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .vau-hours-employee-row + .vau-hours-employee-row {
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-auftraege"] .vau-hours-billable {
    margin-top: 0.75em;
}

body[data-page="vendor-auftraege"] .vau-hours-billable-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375em;
}

body[data-page="vendor-auftraege"] .vau-hours-billable-row {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="vendor-auftraege"] .vau-hours-billable-unit {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-tertiary);
}

body[data-page="vendor-auftraege"] .vau-hours-billable-converted {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

body[data-page="vendor-auftraege"] .vau-hours-hint {
    display: block;
    margin-top: 0.25em;
    font-size: 0.75em;
    color: var(--text-tertiary);
}

/* ============================================ */
/*         ABRECHNUNG TABLE                    */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-abrechnung-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125em;
}

body[data-page="vendor-auftraege"] .vau-abrechnung-table th {
    text-align: left;
    padding: 0.5em 0.375em;
    border-bottom: 2px solid var(--glass-border);
    color: var(--text-secondary);
    font-weight: 500;
}

body[data-page="vendor-auftraege"] .vau-abrechnung-table td {
    padding: 0.375em;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .vau-abrechnung-table tfoot td {
    border-top: 2px solid var(--glass-border);
    font-weight: 600;
    padding-top: 0.5em;
}

body[data-page="vendor-auftraege"] .vau-abr-total-label {
    text-align: right;
}

body[data-page="vendor-auftraege"] .vau-abr-total-value {
    font-feature-settings: "tnum";
}

body[data-page="vendor-auftraege"] .vau-abr-line-total {
    font-feature-settings: "tnum";
    text-align: right;
}

body[data-page="vendor-auftraege"] .vau-abr-qty,
body[data-page="vendor-auftraege"] .vau-abr-price {
    width: 5.5em;
    padding: 0.3125em 0.5em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.375em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-variant-numeric: tabular-nums;
    text-align: right;
    transition: border-color 0.2s;
}

body[data-page="vendor-auftraege"] .vau-abr-qty:focus,
body[data-page="vendor-auftraege"] .vau-abr-price:focus {
    outline: none;
    border-color: var(--sunset-warm);
    box-shadow: 0 0 0 2px rgba(var(--sunset-rgb), 0.12);
}

/* ============================================ */
/*         VIEW SWITCHER                       */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-view-controls {
    display: flex;
    align-items: center;
}

body[data-page="vendor-auftraege"] .vau-view-switcher {
    display: flex;
    gap: 0.125em;
    background: var(--glass-secondary);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    padding: 0.1875em;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
}

body[data-page="vendor-auftraege"] .vau-view-btn {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.875em;
    border: none;
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

body[data-page="vendor-auftraege"] .vau-view-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .vau-view-btn.active {
    background: rgba(var(--sunset-rgb), 0.18);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 0 1em rgba(var(--sunset-rgb), 0.25);
}

body[data-page="vendor-auftraege"] .vau-view-btn [data-icon] {
    font-size: 1em;
}

/* ============================================ */
/*         EMPLOYEE CHIPS (on Kanban cards)    */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-card-employees {
    display: flex;
    align-items: center;
    gap: 0.25em;
    margin-bottom: 0.375em;
    flex-wrap: wrap;
}

body[data-page="vendor-auftraege"] .vau-employee-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.125em 0.5em 0.125em 0.125em;
    border-radius: 999px;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-secondary);
}

body[data-page="vendor-auftraege"] .vau-employee-avatar {
    width: 1.375em;
    height: 1.375em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--button-text-on-color);
    background: var(--sunset-warm);
    overflow: hidden;
    flex-shrink: 0;
}

body[data-page="vendor-auftraege"] .vau-employee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body[data-page="vendor-auftraege"] .vau-employee-overflow {
    display: inline-flex;
    align-items: center;
    padding: 0.125em 0.375em;
    border-radius: 999px;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    font-family: var(--font-sans);
    font-size: 0.625em;
    font-weight: 600;
    color: var(--text-tertiary);
}

/* ============================================ */
/*         TIMELINE VIEW (Gantt)               */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-timeline {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 25em;
}

body[data-page="vendor-auftraege"] .vau-timeline-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75em;
    margin-bottom: 1em;
}

body[data-page="vendor-auftraege"] .vau-zoom-switcher {
    display: flex;
    gap: 0;
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    overflow: hidden;
}

body[data-page="vendor-auftraege"] .vau-zoom-btn {
    padding: 0.375em 0.75em;
    border: none;
    background: var(--glass-primary);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    transition: all 0.15s;
    border-right: 1px solid var(--glass-border);
}

body[data-page="vendor-auftraege"] .vau-zoom-btn:last-child {
    border-right: none;
}

body[data-page="vendor-auftraege"] .vau-zoom-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .vau-zoom-btn.active {
    background: var(--sunset-warm);
    color: var(--button-text-on-color);
}

body[data-page="vendor-auftraege"] .vau-today-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.375em 0.75em;
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    background: var(--glass-primary);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    transition: all 0.15s;
}

body[data-page="vendor-auftraege"] .vau-today-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .vau-today-btn [data-icon] {
    font-size: 0.875em;
}

body[data-page="vendor-auftraege"] .vau-gantt-container {
    flex: 1;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Frappe Gantt theme overrides */
body[data-page="vendor-auftraege"] .gantt .grid-background {
    fill: none;
}

body[data-page="vendor-auftraege"] .gantt .grid-header {
    fill: var(--glass-secondary);
    stroke: var(--glass-border);
}

body[data-page="vendor-auftraege"] .gantt .grid-row {
    fill: transparent;
}

body[data-page="vendor-auftraege"] .gantt .grid-row:nth-child(even) {
    fill: var(--glass-primary);
}

body[data-page="vendor-auftraege"] .gantt .row-line {
    stroke: var(--glass-border);
}

body[data-page="vendor-auftraege"] .gantt .tick {
    stroke: var(--glass-border);
    stroke-dasharray: 4;
}

body[data-page="vendor-auftraege"] .gantt .today-highlight {
    fill: rgba(var(--sunset-rgb), 0.08);
    opacity: 1;
}

body[data-page="vendor-auftraege"] .gantt .upper-text,
body[data-page="vendor-auftraege"] .gantt .lower-text {
    fill: var(--text-primary);
    font-family: var(--font-sans);
    font-size: calc(0.75rem * var(--font-scale, 1));
}

/* Base bar styles (default sunset orange) */
body[data-page="vendor-auftraege"] .gantt .bar {
    fill: var(--sunset-warm) !important;
    cursor: pointer;
    rx: 4;
    ry: 4;
}

body[data-page="vendor-auftraege"] .gantt .bar-progress {
    fill: var(--sunset-warm) !important;
    opacity: 0.9;
}

body[data-page="vendor-auftraege"] .gantt .bar-group:hover .bar {
    fill: var(--sunset-glow) !important;
}

body[data-page="vendor-auftraege"] .gantt .bar-group:hover .bar-progress {
    fill: var(--sunset-glow) !important;
    opacity: 1;
}

/* Stage-colored bars (custom_class on bar-wrapper) */
body[data-page="vendor-auftraege"] .gantt .bar-wrapper.stage-angebote .bar,
body[data-page="vendor-auftraege"] .gantt .bar-wrapper.stage-angebote .bar-progress {
    fill: var(--stage-angebote) !important;
}

body[data-page="vendor-auftraege"] .gantt .bar-wrapper.stage-geplant .bar,
body[data-page="vendor-auftraege"] .gantt .bar-wrapper.stage-geplant .bar-progress {
    fill: var(--stage-geplant) !important;
}

body[data-page="vendor-auftraege"] .gantt .bar-wrapper.stage-laufend .bar,
body[data-page="vendor-auftraege"] .gantt .bar-wrapper.stage-laufend .bar-progress {
    fill: var(--stage-laufend) !important;
}

body[data-page="vendor-auftraege"] .gantt .bar-wrapper.stage-abschliessen .bar,
body[data-page="vendor-auftraege"] .gantt .bar-wrapper.stage-abschliessen .bar-progress {
    fill: var(--stage-abschliessen) !important;
}

body[data-page="vendor-auftraege"] .gantt .bar-wrapper.stage-abgeschlossen .bar,
body[data-page="vendor-auftraege"] .gantt .bar-wrapper.stage-abgeschlossen .bar-progress {
    fill: var(--stage-abgeschlossen) !important;
}

body[data-page="vendor-auftraege"] .gantt .bar-label {
    fill: var(--button-text-on-color) !important;
    font-family: var(--font-sans);
    font-size: calc(0.75rem * var(--font-scale, 1));
    font-weight: 500;
}

/* Gantt popup */
body[data-page="vendor-auftraege"] .gantt .popup-wrapper .pointer {
    display: none;
}

body[data-page="vendor-auftraege"] .gantt .popup-wrapper {
    background: var(--glass-secondary);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75em;
    padding: 0.75em 1em;
    box-shadow: 0 0.5em 2em rgba(0, 0, 0, 0.2);
}

body[data-page="vendor-auftraege"] .gantt .popup-wrapper .title {
    font-family: var(--font-sans);
    font-size: calc(0.875rem * var(--font-scale, 1));
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25em;
}

body[data-page="vendor-auftraege"] .gantt .popup-wrapper .subtitle {
    font-family: var(--font-sans);
    font-size: calc(0.75rem * var(--font-scale, 1));
    color: var(--text-secondary);
}

/* ============================================ */
/*         CALENDAR VIEW (FullCalendar)        */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-calendar {
    flex: 1;
}

body[data-page="vendor-auftraege"] .vau-calendar-container {
    min-height: 35em;
    border-radius: 0.75em;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    padding: 0.75em;
}

/* FullCalendar theme overrides */
body[data-page="vendor-auftraege"] .fc {
    font-family: var(--font-sans);
}

body[data-page="vendor-auftraege"] .fc .fc-toolbar-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.25em;
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .fc .fc-button-primary {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    border-radius: 0.375em;
    transition: all 0.15s;
}

body[data-page="vendor-auftraege"] .fc .fc-button-primary:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-auftraege"] .fc .fc-button-primary:disabled {
    opacity: 0.5;
}

body[data-page="vendor-auftraege"] .fc .fc-button-primary.fc-button-active,
body[data-page="vendor-auftraege"] .fc .fc-button-primary:not(:disabled):active {
    background: var(--sunset-warm);
    border-color: var(--sunset-warm);
    color: var(--button-text-on-color);
}

body[data-page="vendor-auftraege"] .fc .fc-col-header-cell {
    background: var(--glass-secondary);
    border-color: var(--glass-border);
}

body[data-page="vendor-auftraege"] .fc .fc-col-header-cell-cushion {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8125em;
    text-decoration: none;
}

body[data-page="vendor-auftraege"] .fc .fc-day-today {
    background: rgba(var(--sunset-rgb), 0.06);
}

body[data-page="vendor-auftraege"] .fc .fc-daygrid-day {
    border-color: var(--glass-border);
}

body[data-page="vendor-auftraege"] .fc .fc-daygrid-day-number {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125em;
}

body[data-page="vendor-auftraege"] .fc .fc-scrollgrid {
    border-color: var(--glass-border);
}

body[data-page="vendor-auftraege"] .fc td,
body[data-page="vendor-auftraege"] .fc th {
    border-color: var(--glass-border);
}

body[data-page="vendor-auftraege"] .fc .fc-event {
    border: none;
    border-radius: 0.25em;
    padding: 0.0625em 0.25em;
    font-size: 0.75em;
    cursor: pointer;
}

body[data-page="vendor-auftraege"] .fc .fc-daygrid-event-dot {
    display: none;
}

body[data-page="vendor-auftraege"] .fc .fc-event-title {
    font-weight: 500;
    color: var(--button-text-on-color);
}

body[data-page="vendor-auftraege"] .fc .fc-list-event-title a {
    color: var(--text-primary);
    text-decoration: none;
}

body[data-page="vendor-auftraege"] .fc .fc-list-day-cushion {
    background: var(--glass-secondary);
}

body[data-page="vendor-auftraege"] .fc .fc-list-day-text,
body[data-page="vendor-auftraege"] .fc .fc-list-day-side-text {
    color: var(--text-primary);
    text-decoration: none;
}

/* ============================================ */
/*         EMPTY STATES (timeline/calendar)    */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-timeline-empty,
body[data-page="vendor-auftraege"] .vau-calendar-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4em 2em;
    color: var(--text-tertiary);
    gap: 0.5em;
    font-family: var(--font-sans);
    font-size: 0.875em;
}

body[data-page="vendor-auftraege"] .vau-timeline-empty [data-icon],
body[data-page="vendor-auftraege"] .vau-calendar-empty [data-icon] {
    font-size: 2em;
    opacity: 0.5;
}

/* ============================================ */
/*         HIDDEN UTILITY                      */
/* ============================================ */

body[data-page="vendor-auftraege"] .vau-hidden {
    display: none;
}

/* ============================================ */
/*         RESPONSIVE — MOBILE (<48em)         */
/* ============================================ */

@media (max-width: 48em) {
    body[data-page="vendor-auftraege"] .vau-mobile-tabs {
        display: flex;
    }

    body[data-page="vendor-auftraege"] .vau-kanban {
        display: block;
    }

    body[data-page="vendor-auftraege"] .vau-kanban-col {
        display: none;
        min-height: 0;
    }

    body[data-page="vendor-auftraege"] .vau-kanban-col.active {
        display: flex;
    }

    body[data-page="vendor-auftraege"] .vau-header {
        flex-wrap: wrap;
    }

    body[data-page="vendor-auftraege"] .vau-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    body[data-page="vendor-auftraege"] .vau-toolbar {
        flex-wrap: wrap;
    }

    body[data-page="vendor-auftraege"] .vau-search-bar {
        max-width: none;
        flex-basis: 100%;
    }

    body[data-page="vendor-auftraege"] .vau-view-btn {
        padding: 0.375em 0.5em;
    }

    body[data-page="vendor-auftraege"] .vau-view-label {
        display: none;
    }

    body[data-page="vendor-auftraege"] .vau-timeline {
        min-height: 15em;
    }

    body[data-page="vendor-auftraege"] .vau-timeline-controls {
        flex-wrap: wrap;
    }

    body[data-page="vendor-auftraege"] .vau-calendar-container {
        min-height: 25em;
    }

    body[data-page="vendor-auftraege"] .vau-detail-modal {
        max-width: none;
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    body[data-page="vendor-auftraege"] .vau-detail-info-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="vendor-auftraege"] .vau-photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-page="vendor-auftraege"] .vau-detail-overlay {
        padding: 0;
    }

    body[data-page="vendor-auftraege"] .vau-page {
        padding-left: 1.5em;
    }
}

@media (max-width: 75em) and (min-width: 48.0625em) {
    body[data-page="vendor-auftraege"] .vau-kanban {
        grid-template-columns: repeat(3, 1fr);
    }

    body[data-page="vendor-auftraege"] .vau-kanban-col:nth-child(4),
    body[data-page="vendor-auftraege"] .vau-kanban-col:nth-child(5) {
        grid-column: span 1;
    }
}

/**
 * @file vendor-kunden.css
 * @filepath public/css/pages/vendor-kunden.css
 * @description Scoped styles for vendor client database page.
 *   Master-detail layout with glass containers, accent-primary throughout.
 * @created 2026-03-02
 * @updated 2026-03-10 — glass containers, accent-primary color, improved weight
 * @updated 2026-03-15 — notes list with date, author, delete button (#12)
 */

/* ============================================ */
/*  VENDOR KUNDEN — Scoped to data-page        */
/* ============================================ */

body[data-page="vendor-kunden"] {
    overflow: hidden;
}

/* ── Page Container ── */
.vk-page {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
    padding: 0.75em;
    gap: 0.75em;
}

/* ── Header ── */
.vk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.5em;
    flex-shrink: 0;
}

.vk-header-left {
    display: flex;
    align-items: center;
    gap: 1em;
}

.vk-back-btn {
    display: flex;
    align-items: center;
    gap: 0.25em;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.875em;
}

.vk-page-title {
    margin: 0;
    color: var(--text-primary);
}

.vk-header-actions {
    display: flex;
    gap: 0.5em;
}

.vk-add-btn {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 1em;
    background: var(--accent-primary);
    color: var(--button-text-on-color);
    border: none;
    border-radius: 0.625em;
    font-size: 0.875em;
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.vk-add-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.vk-add-btn:active {
    transform: translateY(0);
}

/* ── Search ── */
.vk-search-bar {
    padding: 0 0.5em 0;
    flex-shrink: 0;
}

.vk-search-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5em;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    padding: 0.5em 0.75em;
    transition: border-color var(--transition-fast);
}

.vk-search-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.12);
}

.vk-search-icon {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.vk-search-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    color: var(--text-primary) !important;
    font-size: 0.875em;
    outline: none;
    padding: 0 !important;
}

.vk-search-input::placeholder {
    color: var(--text-quaternary) !important;
}

/* ── Loading ── */
.vk-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1em;
    padding: 4em 1em;
    color: var(--text-tertiary);
}

.vk-loading-spinner {
    width: 2em;
    height: 2em;
    border: 2px solid var(--glass-border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: vk-spin 0.8s linear infinite;
}

@keyframes vk-spin {
    to { transform: rotate(360deg); }
}

/* ── Hidden ── */
.vk-hidden {
    display: none !important;
}

/* ── Empty State ── */
.vk-empty-state-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1em;
    padding: 4em 2em;
    text-align: center;
    grid-column: 1 / -1;
}

.vk-empty-icon {
    width: 4em;
    height: 4em;
    border-radius: 50%;
    background: rgba(var(--accent-primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 1.5em;
}

.vk-empty-title {
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.vk-empty-description {
    font-size: 0.875em;
    color: var(--text-tertiary);
    max-width: 28em;
    line-height: 1.5;
}

.vk-empty-actions {
    display: flex;
    gap: 0.75em;
    margin-top: 0.5em;
}

.vk-empty-action-btn {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 1.25em;
    background: var(--accent-primary);
    color: var(--button-text-on-color);
    border: none;
    border-radius: 0.625em;
    font-size: 0.875em;
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.vk-empty-action-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ── Preliminary Client Card (subtle tint, no dashed border) ── */
.vk-client-card.preliminary {
    background: rgba(var(--accent-primary-rgb), 0.04);
    position: relative;
}

.vk-client-card.preliminary:hover {
    background: rgba(var(--accent-primary-rgb), 0.08);
}

.vk-client-card.preliminary .vk-client-avatar {
    background: rgba(var(--accent-primary-rgb), 0.12);
    color: var(--accent-primary);
}

.vk-client-incomplete-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.125em 0.5em;
    background: rgba(var(--accent-primary-rgb), 0.12);
    color: var(--accent-primary);
    border-radius: 0.375em;
    font-size: 0.625em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25em;
    white-space: nowrap;
}

/* ── Detail: Preliminary Banner ── */
.vk-preliminary-banner {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em 1em;
    background: rgba(var(--accent-primary-rgb), 0.08);
    border: 1px solid rgba(var(--accent-primary-rgb), 0.20);
    border-radius: var(--radius-sm);
    margin-bottom: 1.25em;
}

.vk-preliminary-banner-icon {
    color: var(--accent-primary);
    flex-shrink: 0;
    font-size: 1.25em;
}

.vk-preliminary-banner-text {
    font-size: 0.8125em;
    color: var(--text-secondary);
    flex: 1;
}

.vk-preliminary-banner-text strong {
    color: var(--text-primary);
}

.vk-preliminary-edit-btn {
    padding: 0.375em 0.75em;
    background: var(--accent-primary);
    color: var(--button-text-on-color);
    border: none;
    border-radius: 0.5em;
    font-size: 0.8125em;
    font-weight: var(--font-medium);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity var(--transition-fast);
}

.vk-preliminary-edit-btn:hover {
    opacity: 0.9;
}

/* ── Content: Master-Detail (glass card wrapper) ── */
.vk-content {
    display: grid;
    grid-template-columns: 22em 1fr;
    flex: 1;
    overflow: hidden;
    gap: 0;
    /* Glass card treatment for the whole content area */
    background: var(--glass-primary);
    backdrop-filter: var(--glass-blur) saturate(180%);
    -webkit-backdrop-filter: var(--glass-blur) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    position: relative;
    isolation: isolate;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 40px rgba(var(--accent-primary-rgb), 0.03);
}

/* Chromatic dispersion border (matches .glass-card pattern) */
.vk-content::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(var(--accent-primary-rgb), 0.15),
        rgba(255, 255, 255, 0.08),
        rgba(var(--accent-primary-rgb), 0.10)
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
}

/* ── Client List ── */
.vk-list {
    border-right: 1px solid var(--glass-border);
    overflow-y: auto;
    padding: 0.5em;
    background: var(--glass-secondary);
}

.vk-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
    padding: 3em 1em;
    color: var(--text-tertiary);
    text-align: center;
}

.vk-empty-text {
    font-size: 0.9375em;
    color: var(--text-secondary);
}

.vk-empty-hint {
    font-size: 0.8125em;
    max-width: 18em;
}

.vk-list-items {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

/* ── Client Card (list item) ── */
.vk-client-card {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em;
    border-radius: 0.625em;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
}

.vk-client-card:hover {
    background: var(--glass-hover);
}

.vk-client-card.active {
    background: rgba(var(--accent-primary-rgb), 0.08);
    border-color: rgba(var(--accent-primary-rgb), 0.25);
}

.vk-client-avatar {
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.vk-client-info {
    flex: 1;
    min-width: 0;
}

.vk-client-name {
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vk-client-meta {
    font-size: 0.75em;
    color: var(--text-tertiary);
    display: flex;
    gap: 0.5em;
}

.vk-client-jobs-count {
    color: var(--text-secondary);
}

/* ── Detail Panel ── */
.vk-detail {
    overflow-y: auto;
    padding: 1.25em;
}

.vk-detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75em;
    height: 100%;
    color: var(--text-quaternary);
    font-size: 1em;
}

.vk-detail-placeholder-text {
    font-size: 0.9375em;
}

/* ── Detail Header ── */
.vk-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 1em;
    margin-bottom: 1.25em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--glass-border);
}

.vk-detail-avatar {
    width: 3.5em;
    height: 3.5em;
    border-radius: 50%;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.vk-detail-name {
    font-size: 1.25em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25em;
}

.vk-detail-contact {
    font-size: 0.8125em;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.125em;
}

.vk-detail-stats {
    display: flex;
    gap: 1.5em;
    margin-left: auto;
}

.vk-stat {
    text-align: center;
}

.vk-stat-value {
    font-size: 1.25em;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.vk-stat-label {
    font-size: 0.6875em;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Tabs ── */
.vk-detail-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1em;
}

.vk-tab {
    padding: 0.625em 1em;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-tertiary);
    font-size: 0.875em;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.vk-tab:hover {
    color: var(--text-secondary);
}

.vk-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* ── Tab Panels ── */
.vk-tab-panel {
    display: none;
}

.vk-tab-panel.active {
    display: block;
}

/* ── Overview Panel ── */
.vk-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75em;
    margin-bottom: 1.25em;
}

.vk-info-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
    padding: 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
}

.vk-info-card-full {
    grid-column: 1 / -1;
}

.vk-info-card-icon {
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5em;
    background: rgba(var(--accent-primary-rgb), 0.08);
    color: var(--accent-primary);
    flex-shrink: 0;
    font-size: 0.875em;
}

.vk-info-card-body {
    flex: 1;
    min-width: 0;
}

.vk-info-card-label {
    font-size: 0.6875em;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25em;
}

.vk-info-card-value {
    font-size: 0.875em;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.vk-info-card-value a {
    color: var(--accent-primary);
    text-decoration: none;
}

.vk-info-card-value a:hover {
    text-decoration: underline;
}

.vk-info-card-empty {
    color: var(--text-quaternary);
    font-style: italic;
}

.vk-overview-section {
    margin-bottom: 1.25em;
}

.vk-overview-label {
    font-size: 0.75em;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5em;
}

.vk-overview-value {
    font-size: 0.9375em;
    color: var(--text-primary);
}

/* ── Recent Jobs Preview (in overview tab) ── */
.vk-recent-jobs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5em;
}

.vk-recent-jobs-link {
    font-size: 0.75em;
    color: var(--accent-primary);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

.vk-recent-jobs-link:hover {
    text-decoration: underline;
}

.vk-recent-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

.vk-recent-job {
    display: flex;
    align-items: center;
    gap: 0.625em;
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.8125em;
}

.vk-recent-job-dot {
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    flex-shrink: 0;
}

.vk-recent-job-dot[data-status="abgeschlossen"] {
    background: var(--accent-success);
}

.vk-recent-job-dot[data-status="in_ausfuehrung"] {
    background: var(--ios-system-blue);
}

.vk-recent-job-dot[data-status="geplant"] {
    background: var(--accent-warning);
}

.vk-recent-job-title {
    flex: 1;
    min-width: 0;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vk-recent-job-meta {
    color: var(--text-tertiary);
    white-space: nowrap;
    font-size: 0.875em;
}

.vk-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375em;
}

.vk-tag {
    padding: 0.25em 0.625em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 1em;
    font-size: 0.75em;
    color: var(--text-secondary);
}

/* ── Notes: Add Row ── */
.vk-notes-add-row {
    display: flex;
    gap: var(--spacing-2, 0.5em);
    margin-bottom: var(--spacing-2, 0.5em);
}

.vk-notes-input {
    flex: 1;
    padding: 0.5em 0.625em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-size: 0.875em;
    outline: none;
}

.vk-notes-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.12);
}

.vk-notes-input::placeholder {
    color: var(--text-quaternary);
}

.vk-notes-add-btn {
    padding: 0.375em 1em;
    background: var(--accent-primary);
    color: var(--button-text-on-color);
    border: none;
    border-radius: 0.5em;
    font-size: 0.8125em;
    font-weight: var(--font-medium);
    cursor: pointer;
    white-space: nowrap;
    transition: opacity var(--transition-fast);
}

.vk-notes-add-btn:hover {
    opacity: 0.9;
}

/* ── Notes: List ── */
.vk-notes-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1, 0.25em);
}

.vk-notes-empty {
    padding: 1.5em 1em;
    text-align: center;
    color: var(--text-quaternary);
    font-size: 0.8125em;
}

.vk-note-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-2, 0.5em);
    padding: var(--spacing-2, 0.5em) var(--spacing-3, 0.75em);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
}

.vk-note-date {
    color: var(--text-tertiary);
    font-size: calc(0.75em * var(--font-scale, 1));
    white-space: nowrap;
    min-width: 6em;
    line-height: 1.5;
}

.vk-note-author {
    color: var(--text-quaternary);
    font-size: calc(0.6875em * var(--font-scale, 1));
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 8em;
}

.vk-note-text {
    flex: 1;
    color: var(--text-primary);
    font-size: calc(0.875em * var(--font-scale, 1));
    word-break: break-word;
    line-height: 1.5;
}

.vk-note-delete {
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.25em;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
    flex-shrink: 0;
}

.vk-note-delete:hover {
    color: var(--ios-system-red);
}

/* Legacy: keep textarea styles for backward compat */
.vk-notes-textarea {
    width: 100%;
    min-height: 5em;
    padding: 0.625em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-size: 0.875em;
    resize: vertical;
    outline: none;
}

.vk-notes-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.12);
}

.vk-save-notes-btn {
    margin-top: 0.5em;
    padding: 0.375em 1em;
    background: var(--accent-primary);
    color: var(--button-text-on-color);
    border: none;
    border-radius: 0.5em;
    font-size: 0.8125em;
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.vk-save-notes-btn:hover {
    opacity: 0.9;
}

/* ── Jobs Panel ── */
.vk-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.vk-job-card {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
}

.vk-job-status {
    width: 0.5em;
    height: 2em;
    border-radius: 0.25em;
    flex-shrink: 0;
}

.vk-job-status[data-status="abgeschlossen"] {
    background: var(--ios-system-green);
}

.vk-job-status[data-status="in_ausfuehrung"] {
    background: var(--ios-system-blue);
}

.vk-job-status[data-status="geplant"] {
    background: var(--ios-system-orange, #FF9500);
}

.vk-job-info {
    flex: 1;
    min-width: 0;
}

.vk-job-title {
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vk-job-date {
    font-size: 0.75em;
    color: var(--text-tertiary);
}

.vk-job-amount {
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

/* ── Reminders Panel ── */
.vk-reminders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75em;
}

.vk-add-reminder-btn {
    display: flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.375em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-size: 0.8125em;
    cursor: pointer;
}

.vk-reminders-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.vk-reminder-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
    padding: 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
}

.vk-reminder-check {
    width: 1.25em;
    height: 1.25em;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    margin-top: 0.125em;
    transition: background 0.15s, border-color 0.15s;
}

.vk-reminder-check:hover {
    border-color: var(--ios-system-green);
}

.vk-reminder-card.completed .vk-reminder-check {
    background: var(--ios-system-green);
    border-color: var(--ios-system-green);
}

.vk-reminder-body {
    flex: 1;
    min-width: 0;
}

.vk-reminder-title {
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
}

.vk-reminder-desc {
    font-size: 0.8125em;
    color: var(--text-secondary);
    margin-top: 0.125em;
}

.vk-reminder-due {
    font-size: 0.75em;
    color: var(--text-tertiary);
    margin-top: 0.25em;
}

.vk-reminder-due.overdue {
    color: var(--ios-system-red);
}

.vk-reminder-actions {
    display: flex;
    gap: 0.25em;
    flex-shrink: 0;
}

.vk-reminder-action-btn {
    width: 1.75em;
    height: 1.75em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: 0.25em;
}

.vk-reminder-action-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* ── Reminder Modal ── */
.vk-reminder-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-backdrop);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
    --_glass-card-bg: var(--glass-modal-bg);
    --_glass-card-blur: blur(40px);
    animation: fadeIn 0.2s ease;
}

.vk-reminder-modal {
    background: var(--glass-modal-bg, var(--glass-primary));
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 28em;
    padding: 1.5em;
    z-index: var(--z-modal);
    animation: glassModalEnter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vk-reminder-modal h3 {
    margin: 0 0 1em;
    color: var(--text-primary);
    font-size: 1.125em;
}

.vk-modal-field {
    margin-bottom: 0.75em;
}

.vk-modal-field label {
    display: block;
    font-size: 0.8125em;
    color: var(--text-secondary);
    margin-bottom: 0.25em;
}

.vk-modal-field input,
.vk-modal-field textarea,
.vk-modal-field select {
    width: 100%;
    padding: 0.5em 0.625em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-size: 0.875em;
    outline: none;
}

.vk-modal-field input:focus,
.vk-modal-field textarea:focus,
.vk-modal-field select:focus {
    border-color: var(--accent-primary);
}

.vk-modal-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.5em;
}

.vk-modal-actions {
    display: flex;
    gap: 0.5em;
    justify-content: flex-end;
    margin-top: 1.25em;
}

.vk-modal-btn {
    padding: 0.5em 1.25em;
    border: none;
    border-radius: 0.5em;
    font-size: 0.875em;
    cursor: pointer;
}

.vk-modal-btn-cancel {
    background: var(--glass-secondary);
    color: var(--text-primary);
}

.vk-modal-btn-save {
    background: var(--accent-primary);
    color: var(--button-text-on-color);
    font-weight: var(--font-medium);
    transition: opacity var(--transition-fast);
}

.vk-modal-btn-save:hover {
    opacity: 0.9;
}

/* ── Add Client Modal ── */
.vk-client-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-backdrop);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
    --_glass-card-bg: var(--glass-modal-bg);
    --_glass-card-blur: blur(40px);
    animation: fadeIn 0.2s ease;
}

.vk-client-modal {
    background: var(--glass-modal-bg, var(--glass-primary));
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 30em;
    padding: 1.5em;
    z-index: var(--z-modal);
    animation: glassModalEnter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Detail panel glass interior ── */
.vk-detail {
    background: transparent;
}

/* ── Responsive: Mobile ── */
@media (max-width: 48em) {
    .vk-page {
        padding: 0.5em;
        gap: 0.5em;
    }

    .vk-content {
        grid-template-columns: 1fr;
    }

    .vk-list {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        max-height: 40dvh;
    }

    .vk-detail-placeholder {
        display: none;
    }

    .vk-detail-stats {
        margin-left: 0;
        margin-top: 0.75em;
    }

    .vk-detail-header {
        flex-wrap: wrap;
    }
}

/**
 * @file vendor-calendar.css
 * @filepath public/css/pages/vendor-calendar.css
 * @description Full calendar page styles including FullCalendar theme overrides,
 *   create/detail modals, attendee chips, calendar dropdown, toggle switch,
 *   auftrag-linked shifts, daily packing list, and multi-month year view.
 *   All 5 themes supported (light, lightmodern, dark, darkart, darkmodern).
 *   Scoped to body[data-page="vendor-calendar"].
 * @created 2026-02-14
 * @updated 2026-03-03 — Extracted embedded <style> block from vendor-calendar.html
 */

/* ============================================ */
/*         SUNSET PALETTE (page-scoped)        */
/* ============================================ */

body[data-page="vendor-calendar"] {
    --sunset-warm: #F26419;
    --sunset-glow: #FF8C42;
    --sunset-deep: #E55100;
    --sunset-amber: #FFAE42;
    --sunset-rgb: 242, 100, 25;
    --sunset-glow-rgb: 255, 140, 66;
    --sunset-amber-rgb: 255, 174, 66;
}

/* ============================================ */
/*         AUFTRAG EVENT COLORS                */
/*   Override FullCalendar's default styling    */
/* ============================================ */

body[data-page="vendor-calendar"] .fc-event.shift-auftrag {
    --fc-event-bg-color: var(--sunset-warm);
    --fc-event-border-color: var(--sunset-warm);
}

body[data-page="vendor-calendar"] .fc-event.shift-completed {
    --fc-event-bg-color: var(--ios-system-green, #34C759);
    --fc-event-border-color: var(--ios-system-green, #34C759);
}

/* Auftrag dot in month view */
body[data-page="vendor-calendar"] .fc-event-dot-display .shift-dot-auftrag {
    background-color: var(--sunset-warm);
}

/* ============================================ */
/*         PACKING LIST PANEL                  */
/* ============================================ */

body[data-page="vendor-calendar"] .vcal-packing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(0.375em);
    -webkit-backdrop-filter: blur(0.375em);
    display: none;
    align-items: center;
    justify-content: flex-end;
    z-index: 1000;
    padding: 1em;
}

body[data-page="vendor-calendar"] .vcal-packing-overlay.open {
    display: flex;
}

body[data-page="vendor-calendar"] .vcal-packing-panel {
    width: 100%;
    max-width: 28em;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: vcalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vcalSlideIn {
    from {
        opacity: 0;
        transform: translateX(2em);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

body[data-page="vendor-calendar"] .vcal-packing-accent {
    height: 3px;
    background: linear-gradient(90deg,
        var(--sunset-warm),
        var(--sunset-glow),
        transparent);
    border-radius: 0.75em 0.75em 0 0;
}

body[data-page="vendor-calendar"] .vcal-packing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-calendar"] .vcal-packing-title {
    font-family: var(--font-serif);
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

body[data-page="vendor-calendar"] .vcal-packing-date {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-tertiary);
    margin-top: 0.125em;
}

body[data-page="vendor-calendar"] .vcal-packing-close {
    width: 2em;
    height: 2em;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

body[data-page="vendor-calendar"] .vcal-packing-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="vendor-calendar"] .vcal-packing-body {
    flex: 1;
    overflow-y: auto;
    padding: 1em 1.25em;
}

/* ============================================ */
/*         JOB GROUP                           */
/* ============================================ */

body[data-page="vendor-calendar"] .vcal-job-group {
    margin-bottom: 1.25em;
}

body[data-page="vendor-calendar"] .vcal-job-group:last-child {
    margin-bottom: 0;
}

body[data-page="vendor-calendar"] .vcal-job-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.625em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-calendar"] .vcal-job-color {
    width: 0.25em;
    height: 2em;
    border-radius: 0.125em;
    background: var(--sunset-warm);
    flex-shrink: 0;
}

body[data-page="vendor-calendar"] .vcal-job-info {
    flex: 1;
    min-width: 0;
}

body[data-page="vendor-calendar"] .vcal-job-title {
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-page="vendor-calendar"] .vcal-job-meta {
    display: flex;
    gap: 0.75em;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
}

body[data-page="vendor-calendar"] .vcal-job-time {
    display: flex;
    align-items: center;
    gap: 0.25em;
}

/* ============================================ */
/*         CHECKLIST ITEMS                     */
/* ============================================ */

body[data-page="vendor-calendar"] .vcal-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

body[data-page="vendor-calendar"] .vcal-checklist-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.625em;
    border-radius: 0.5em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    transition: background 0.15s;
}

body[data-page="vendor-calendar"] .vcal-checklist-item.checked {
    background: rgba(var(--sunset-rgb), 0.04);
}

body[data-page="vendor-calendar"] .vcal-check-box {
    width: 1.25em;
    height: 1.25em;
    border-radius: 0.25em;
    border: 1.5px solid var(--glass-border);
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
    color: transparent;
    font-size: 0.75em;
}

body[data-page="vendor-calendar"] .vcal-checklist-item.checked .vcal-check-box {
    background: var(--sunset-warm);
    border-color: var(--sunset-warm);
    color: var(--button-text-on-color);
}

body[data-page="vendor-calendar"] .vcal-check-name {
    flex: 1;
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-primary);
}

body[data-page="vendor-calendar"] .vcal-checklist-item.checked .vcal-check-name {
    text-decoration: line-through;
    color: var(--text-tertiary);
}

body[data-page="vendor-calendar"] .vcal-check-qty {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Empty state */
body[data-page="vendor-calendar"] .vcal-packing-empty {
    text-align: center;
    padding: 2em 1em;
    color: var(--text-quaternary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
}

/* No auftrag shift info */
body[data-page="vendor-calendar"] .vcal-shift-only {
    padding: 0.625em 0.75em;
    border-radius: 0.5em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-secondary);
    margin-bottom: 0.75em;
}

/* ============================================ */
/*         PRINT STYLES                        */
/* ============================================ */

@media print {
    body[data-page="vendor-calendar"] .vcal-packing-overlay {
        position: static;
        display: block;
        background: none;
        backdrop-filter: none;
        padding: 0;
    }

    body[data-page="vendor-calendar"] .vcal-packing-panel {
        max-width: none;
        max-height: none;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    body[data-page="vendor-calendar"] .vcal-packing-close {
        display: none;
    }
}

/* ============================================ */
/*         RESPONSIVE (<48em)                  */
/* ============================================ */

@media (max-width: 48em) {
    body[data-page="vendor-calendar"] .vcal-packing-panel {
        max-width: none;
    }

    body[data-page="vendor-calendar"] .vcal-packing-overlay {
        padding: 0;
        align-items: stretch;
    }
}

/* ============================================ */
/*  EXTRACTED FROM vendor-calendar.html <style> */
/*  2026-03-03                                  */
/* ============================================ */

/* ============================================ */
/*         PAGE LAYOUT                         */
/* ============================================ */

body[data-page="vendor-calendar"] .calendar-page {
    height: 100vh;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    overflow: hidden;
}

/* Top action bar - no background, just buttons */
body[data-page="vendor-calendar"] .calendar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body[data-page="vendor-calendar"] .calendar-actions-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

body[data-page="vendor-calendar"] .calendar-actions-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

body[data-page="vendor-calendar"] .action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.9375em;
}

body[data-page="vendor-calendar"] .action-btn:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border-hover, var(--glass-border));
}

/* ============================================ */
/*         CREATE EVENT BUTTON                 */
/* ============================================ */

body[data-page="vendor-calendar"] #createEventBtn {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-weight: 600;
    box-shadow:
        0 0 20px rgba(255, 149, 0, 0.4),
        0 0 40px rgba(255, 149, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

body[data-page="vendor-calendar"] #createEventBtn::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: calc(var(--radius-md) + 3px);
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.6), rgba(255, 100, 0, 0.3));
    z-index: -1;
    filter: blur(8px);
    opacity: 0.7;
}

body[data-page="vendor-calendar"] #createEventBtn:hover {
    background: #e68600;
    border-color: #e68600;
    box-shadow:
        0 0 25px rgba(255, 149, 0, 0.5),
        0 0 50px rgba(255, 149, 0, 0.3),
        0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

body[data-page="vendor-calendar"] #createEventBtn:hover::before {
    opacity: 0.9;
}

body[data-page="vendor-calendar"] .action-btn.icon-only {
    padding: var(--spacing-sm);
    width: 40px;
    height: 40px;
}

/* ============================================ */
/*         CALENDAR CONTAINER                  */
/* ============================================ */

body[data-page="vendor-calendar"] .calendar-wrapper {
    flex: 1;
    background: var(--glass-card, var(--glass-primary));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body[data-page="vendor-calendar"] .calendar-container {
    flex: 1;
    min-height: 0;
    height: calc(100vh - 180px);
}

/* ============================================ */
/*         FULLCALENDAR THEME OVERRIDES        */
/* ============================================ */

body[data-page="vendor-calendar"] .calendar-container .fc {
    height: 100%;
    font-family: var(--font-sans);
}

body[data-page="vendor-calendar"] .calendar-container .fc-theme-standard {
    --fc-border-color: var(--glass-border);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: var(--glass-secondary);
    --fc-list-event-hover-bg-color: var(--glass-hover);
    --fc-today-bg-color: rgba(0, 122, 255, 0.08);
    --fc-button-text-color: var(--text-primary);
    --fc-button-bg-color: var(--glass-secondary);
    --fc-button-border-color: var(--glass-border);
    --fc-neutral-text-color: var(--text-secondary);
}

/* Toolbar title */
body[data-page="vendor-calendar"] .calendar-container .fc-toolbar-title {
    color: var(--text-primary);
    font-size: 1.5em;
    font-weight: 600;
}

/* Navigation buttons */
body[data-page="vendor-calendar"] .calendar-container .fc-button {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5em 1em;
    border-radius: var(--radius-md);
    text-transform: none;
    font-size: 0.875em;
}

body[data-page="vendor-calendar"] .calendar-container .fc-button:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

body[data-page="vendor-calendar"] .calendar-container .fc-button:focus {
    box-shadow: none;
}

body[data-page="vendor-calendar"] .calendar-container .fc-button:disabled {
    opacity: 0.5;
    color: var(--text-tertiary);
}

body[data-page="vendor-calendar"] .calendar-container .fc-button-active {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

body[data-page="vendor-calendar"] .calendar-container .fc-button-active:hover {
    background: var(--ios-system-orange);
    opacity: 0.9;
    color: var(--button-text-on-color);
}

/* Column headers (Mo, Di, Mi...) */
body[data-page="vendor-calendar"] .calendar-container .fc-col-header-cell {
    background: var(--glass-secondary);
    padding: var(--spacing-sm) 0;
}

body[data-page="vendor-calendar"] .calendar-container .fc-col-header-cell-cushion {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.75em 0;
    text-transform: uppercase;
    font-size: 0.75em;
    letter-spacing: 0.05em;
}

/* Day cells */
body[data-page="vendor-calendar"] .calendar-container .fc-daygrid-day {
    background: transparent;
    transition: background 0.15s ease;
}

body[data-page="vendor-calendar"] .calendar-container .fc-daygrid-day:hover {
    background: var(--glass-primary);
}

body[data-page="vendor-calendar"] .calendar-container .fc-daygrid-day-number {
    color: var(--text-primary);
    padding: 0.5em;
    font-weight: 500;
}

/* Today highlight */
body[data-page="vendor-calendar"] .calendar-container .fc-day-today {
    background: rgba(0, 122, 255, 0.08);
}

body[data-page="vendor-calendar"] .calendar-container .fc-day-today .fc-daygrid-day-number {
    background: var(--ios-system-orange);
    color: var(--text-primary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Events */
body[data-page="vendor-calendar"] .calendar-container .fc-event {
    border-radius: var(--radius-sm);
    border: none;
    padding: 2px 6px;
    font-size: 0.8em;
    cursor: pointer;
    margin: 1px 2px;
}

body[data-page="vendor-calendar"] .calendar-container .fc-event:hover {
    opacity: 0.85;
}

body[data-page="vendor-calendar"] .calendar-container .fc-event-title {
    font-weight: 500;
    color: var(--text-primary);
}

body[data-page="vendor-calendar"] .calendar-container .fc-event-time {
    color: var(--text-primary);
}

/* ============================================ */
/*         CUSTOM DOT DISPLAY FOR EVENTS       */
/* ============================================ */

body[data-page="vendor-calendar"] .fc-event-dot-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
    width: 100%;
    overflow: hidden;
}

body[data-page="vendor-calendar"] .fc-event-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Container for multiple calendar dots */
body[data-page="vendor-calendar"] .fc-event-dots {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

body[data-page="vendor-calendar"] .fc-event-dots .fc-event-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
}

body[data-page="vendor-calendar"] .fc-event-dot-display .fc-event-time {
    font-size: 0.85em;
    color: var(--text-secondary);
    white-space: nowrap;
}

body[data-page="vendor-calendar"] .fc-event-dot-display .fc-event-title {
    font-size: 0.85em;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Make event background transparent for dot style in month view */
body[data-page="vendor-calendar"] .calendar-container .fc-daygrid-event {
    background: transparent !important;
    border: none !important;
}

body[data-page="vendor-calendar"] .calendar-container .fc-daygrid-event:hover {
    background: var(--glass-hover) !important;
}

/* Keep block style for week/day time grid views */
body[data-page="vendor-calendar"] .calendar-container .fc-timegrid-event {
    background: var(--ios-system-orange);
    border: none;
    border-radius: var(--radius-sm);
    padding: 4px 8px;
}

body[data-page="vendor-calendar"] .calendar-container .fc-timegrid-event .fc-event-dot-display {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

body[data-page="vendor-calendar"] .calendar-container .fc-timegrid-event .fc-event-dot {
    display: none;
}

body[data-page="vendor-calendar"] .calendar-container .fc-timegrid-event .fc-event-title,
body[data-page="vendor-calendar"] .calendar-container .fc-timegrid-event .fc-event-time {
    color: var(--button-text-on-color);
}

/* Time grid slots */
body[data-page="vendor-calendar"] .calendar-container .fc-timegrid-slot {
    height: 3em;
}

body[data-page="vendor-calendar"] .calendar-container .fc-timegrid-slot-label {
    color: var(--text-tertiary);
    font-size: 0.75em;
}

body[data-page="vendor-calendar"] .calendar-container .fc-timegrid-axis-cushion {
    color: var(--text-tertiary);
}

/* Now indicator */
body[data-page="vendor-calendar"] .calendar-container .fc-timegrid-now-indicator-line {
    border-color: var(--ios-system-red);
}

body[data-page="vendor-calendar"] .calendar-container .fc-timegrid-now-indicator-arrow {
    border-color: var(--ios-system-red);
    border-top-color: transparent;
    border-bottom-color: transparent;
}

/* ============================================ */
/*         LIST VIEW                           */
/* ============================================ */

body[data-page="vendor-calendar"] .calendar-container .fc-list-event {
    background: var(--glass-primary);
}

body[data-page="vendor-calendar"] .calendar-container .fc-list-event:hover td {
    background: var(--glass-hover);
}

body[data-page="vendor-calendar"] .calendar-container .fc-list-day-cushion {
    background: var(--glass-secondary);
}

/* List view date headers - main date text */
body[data-page="vendor-calendar"] .calendar-container .fc-list-day-text,
body[data-page="vendor-calendar"] .calendar-container .fc-list-day-cushion a,
body[data-page="vendor-calendar"] .calendar-container .fc-list-day a,
body[data-page="vendor-calendar"] .fc .fc-list-day-text,
body[data-page="vendor-calendar"] .fc .fc-list-day-cushion a {
    color: var(--text-primary);
    text-decoration: none;
}

/* List view weekday text (Freitag, Samstag, etc.) */
body[data-page="vendor-calendar"] .calendar-container .fc-list-day-side-text,
body[data-page="vendor-calendar"] .fc .fc-list-day-side-text {
    color: var(--text-secondary);
}

/* Force dark theme list view text - !important needed to override CDN styles */
body[data-page="vendor-calendar"] [data-theme="dark"] .fc-list-day-text,
body[data-page="vendor-calendar"] [data-theme="dark"] .fc-list-day-cushion a,
body[data-page="vendor-calendar"] [data-theme="dark"] .fc-list-day th,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .fc-list-day-text,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .fc-list-day-cushion a,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .fc-list-day th {
    color: var(--text-primary) !important;
    text-decoration: none !important;
}

body[data-page="vendor-calendar"] [data-theme="dark"] .fc-list-day-side-text,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .fc-list-day-side-text {
    color: var(--text-secondary) !important;
}

/* Darkart theme - uses warm white - AGGRESSIVE TARGETING */
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list-day-text,
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list-day-cushion a,
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list-day th,
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list-day-cushion,
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list th,
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list-sticky .fc-list-day-cushion,
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list-day .fc-list-day-cushion,
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list-day,
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list-day * {
    color: rgba(250, 245, 239, 0.95) !important;
    text-decoration: none !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list-day-side-text {
    color: rgba(250, 245, 239, 0.75) !important;
}

/* Darkart - Force ALL list view text visible */
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list,
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list *,
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list a,
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list td,
body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list th {
    color: rgba(250, 245, 239, 0.95) !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .fc-list-day-cushion {
    background: rgba(250, 245, 239, 0.1) !important;
}

/* Force light theme list view text */
body[data-page="vendor-calendar"] [data-theme="light"] .fc-list-day-text,
body[data-page="vendor-calendar"] [data-theme="light"] .fc-list-day-cushion a,
body[data-page="vendor-calendar"] [data-theme="light"] .fc-list-day th,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .fc-list-day-text,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .fc-list-day-cushion a,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .fc-list-day th {
    color: rgba(0, 0, 0, 0.9) !important;
    text-decoration: none !important;
}

body[data-page="vendor-calendar"] [data-theme="light"] .fc-list-day-side-text,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .fc-list-day-side-text {
    color: rgba(0, 0, 0, 0.65) !important;
}

body[data-page="vendor-calendar"] .calendar-container .fc-list-event-time,
body[data-page="vendor-calendar"] .calendar-container .fc-list-event-title {
    color: var(--text-primary);
}

body[data-page="vendor-calendar"] .calendar-container .fc-list-event-dot {
    border-color: var(--ios-system-orange);
}

/* List table styling */
body[data-page="vendor-calendar"] .calendar-container .fc-list-table {
    border-color: var(--glass-border);
}

body[data-page="vendor-calendar"] .calendar-container .fc-list-table td,
body[data-page="vendor-calendar"] .calendar-container .fc-list-table th {
    border-color: var(--glass-border);
}

/* ============================================ */
/*         POPOVER (MORE EVENTS)               */
/* ============================================ */

body[data-page="vendor-calendar"] .calendar-container .fc-popover {
    background: var(--glass-card, var(--glass-primary));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
}

body[data-page="vendor-calendar"] .calendar-container .fc-popover-header {
    background: var(--glass-secondary);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

body[data-page="vendor-calendar"] .calendar-container .fc-popover-body {
    padding: var(--spacing-sm);
}

body[data-page="vendor-calendar"] .calendar-container .fc-more-link {
    color: var(--ios-system-orange);
    font-weight: 500;
}

/* Week numbers */
body[data-page="vendor-calendar"] .calendar-container .fc-daygrid-week-number {
    color: var(--text-tertiary);
    font-size: 0.7em;
    padding: 4px;
    background: var(--glass-primary);
}

/* Scrollbar */
body[data-page="vendor-calendar"] .calendar-container .fc-scroller::-webkit-scrollbar {
    width: 8px;
}

body[data-page="vendor-calendar"] .calendar-container .fc-scroller::-webkit-scrollbar-track {
    background: var(--glass-primary);
}

body[data-page="vendor-calendar"] .calendar-container .fc-scroller::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

/* ============================================ */
/*         MULTI-MONTH YEAR VIEW               */
/* ============================================ */

body[data-page="vendor-calendar"] .calendar-container .fc-multimonth {
    background: transparent;
}

/* Month cards - glass effect */
body[data-page="vendor-calendar"] .calendar-container .fc-multimonth-month {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

/* Month title header */
body[data-page="vendor-calendar"] .calendar-container .fc-multimonth-header {
    background: rgba(0, 0, 0, 0.05);
}

body[data-page="vendor-calendar"] .calendar-container .fc-multimonth-title {
    color: #1a1a1a !important;
    font-weight: 600;
    font-size: 1em;
    padding: 8px 12px;
}

/* Day headers (MO, DI, etc.) */
body[data-page="vendor-calendar"] .calendar-container .fc-multimonth .fc-col-header-cell-cushion {
    color: #555 !important;
    font-size: 0.7em;
    font-weight: 600;
}

/* Day numbers */
body[data-page="vendor-calendar"] .calendar-container .fc-multimonth .fc-daygrid-day-number {
    color: #333 !important;
    font-size: 0.85em;
}

/* Event titles */
body[data-page="vendor-calendar"] .calendar-container .fc-multimonth .fc-event-title {
    color: #333 !important;
    font-size: 0.75em;
}

/* Other month days (greyed) */
body[data-page="vendor-calendar"] .calendar-container .fc-multimonth .fc-day-other .fc-daygrid-day-number {
    color: #aaa !important;
}

/* Week numbers - subtle */
body[data-page="vendor-calendar"] .calendar-container .fc-multimonth .fc-daygrid-week-number {
    background: transparent !important;
    color: #999 !important;
    font-size: 0.65em;
}

/* Today highlight */
body[data-page="vendor-calendar"] .calendar-container .fc-multimonth .fc-day-today {
    background: rgba(0, 122, 255, 0.12) !important;
}

body[data-page="vendor-calendar"] .calendar-container .fc-multimonth .fc-day-today .fc-daygrid-day-number {
    color: #FF9500 !important;
    font-weight: 600;
}

/* Cell borders - subtle */
body[data-page="vendor-calendar"] .calendar-container .fc-multimonth .fc-daygrid-day {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* ============================================ */
/*         CREATE EVENT MODAL                  */
/* ============================================ */

body[data-page="vendor-calendar"] .create-event-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

body[data-page="vendor-calendar"] .create-event-modal.hidden {
    display: none;
}

body[data-page="vendor-calendar"] .create-event-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

body[data-page="vendor-calendar"] .create-event-content {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    margin: var(--spacing-lg);
    padding: var(--spacing-xl) var(--spacing-2xl);
    overflow-y: auto;
}

body[data-page="vendor-calendar"] .create-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
}

body[data-page="vendor-calendar"] .create-event-form .form-group {
    margin-bottom: var(--spacing-lg);
}

body[data-page="vendor-calendar"] .create-event-form .form-group label {
    display: block;
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

body[data-page="vendor-calendar"] .create-event-form .form-group.full-width .form-input {
    max-width: 100%;
}

body[data-page="vendor-calendar"] .create-event-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

body[data-page="vendor-calendar"] .create-event-form .form-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1em;
}

body[data-page="vendor-calendar"] .create-event-form .form-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

/* ============================================ */
/*         ATTENDEES (PERSONEN) FIELD           */
/* ============================================ */

body[data-page="vendor-calendar"] .attendees-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    min-height: 48px;
    align-items: center;
}

body[data-page="vendor-calendar"] .attendee-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border-radius: var(--radius-full);
    font-size: 0.875em;
}

body[data-page="vendor-calendar"] .attendee-chip button {
    background: none;
    border: none;
    color: var(--button-text-on-color);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    opacity: 0.8;
}

body[data-page="vendor-calendar"] .attendee-chip button:hover {
    opacity: 1;
}

body[data-page="vendor-calendar"] .attendee-input {
    flex: 1;
    min-width: 180px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1em;
    padding: var(--spacing-xs);
}

body[data-page="vendor-calendar"] .attendee-input:focus {
    outline: none;
}

body[data-page="vendor-calendar"] .attendee-input::placeholder {
    color: var(--text-tertiary);
}

/* ============================================ */
/*         MULTI-CALENDAR TOGGLE DROPDOWN      */
/* ============================================ */

body[data-page="vendor-calendar"] .calendar-dropdown {
    position: relative;
    margin-bottom: var(--spacing-md);
}

body[data-page="vendor-calendar"] .calendar-dropdown:has(.calendar-dropdown-menu.open) {
    margin-bottom: 280px; /* Space for expanded dropdown */
}

body[data-page="vendor-calendar"] .calendar-dropdown-trigger {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1em;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body[data-page="vendor-calendar"] .calendar-dropdown-trigger:hover {
    border-color: var(--glass-border-hover);
}

body[data-page="vendor-calendar"] .calendar-dropdown-trigger .selected-count {
    font-size: 0.875em;
    color: var(--text-secondary);
}

body[data-page="vendor-calendar"] .calendar-dropdown-menu {
    position: absolute;
    top: calc(100% + var(--spacing-xs));
    left: 0;
    right: 0;
    background: var(--glass-card, rgba(30, 30, 40, 0.95));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

body[data-page="vendor-calendar"] .calendar-dropdown-menu.open {
    display: block;
}

body[data-page="vendor-calendar"] .calendar-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    transition: background 0.15s ease;
}

body[data-page="vendor-calendar"] .calendar-option:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-calendar"] .calendar-option-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

body[data-page="vendor-calendar"] .calendar-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

body[data-page="vendor-calendar"] .calendar-option-name {
    color: var(--text-primary);
}

/* ============================================ */
/*         TOGGLE SWITCH                       */
/* ============================================ */

body[data-page="vendor-calendar"] .toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--glass-secondary);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

body[data-page="vendor-calendar"] .toggle-switch.active {
    background: var(--ios-system-green);
}

body[data-page="vendor-calendar"] .toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body[data-page="vendor-calendar"] .toggle-switch.active::after {
    transform: translateX(20px);
}

body[data-page="vendor-calendar"] .create-event-form .form-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-calendar"] .create-event-form .glass-button.primary {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

/* ============================================ */
/*         LIGHT THEME MODAL FIXES             */
/* ============================================ */

body[data-page="vendor-calendar"] [data-theme="light"] .create-event-content,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .create-event-content {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body[data-page="vendor-calendar"] [data-theme="light"] .create-event-form .form-input,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .create-event-form .form-input {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

body[data-page="vendor-calendar"] [data-theme="light"] .create-event-form .form-input::placeholder,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .create-event-form .form-input::placeholder {
    color: var(--text-tertiary);
}

/* ============================================ */
/*         DARK THEME MODAL FIXES              */
/* ============================================ */

body[data-page="vendor-calendar"] [data-theme="dark"] .create-event-content,
body[data-page="vendor-calendar"] [data-theme="darkart"] .create-event-content,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .create-event-content {
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-page="vendor-calendar"] [data-theme="dark"] .create-event-form .form-input,
body[data-page="vendor-calendar"] [data-theme="darkart"] .create-event-form .form-input,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .create-event-form .form-input {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

body[data-page="vendor-calendar"] [data-theme="dark"] .create-event-form .form-input::placeholder,
body[data-page="vendor-calendar"] [data-theme="darkart"] .create-event-form .form-input::placeholder,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .create-event-form .form-input::placeholder {
    color: var(--text-tertiary);
}

/* ============================================ */
/*         LIGHT THEME - ATTENDEES & DROPDOWN  */
/* ============================================ */

body[data-page="vendor-calendar"] [data-theme="light"] .attendees-container,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .attendees-container {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body[data-page="vendor-calendar"] [data-theme="light"] .attendee-input,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .attendee-input {
    color: rgba(0, 0, 0, 0.9);
}

body[data-page="vendor-calendar"] [data-theme="light"] .calendar-dropdown-trigger,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .calendar-dropdown-trigger {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.9);
}

body[data-page="vendor-calendar"] [data-theme="light"] .calendar-dropdown-menu,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .calendar-dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.1);
}

body[data-page="vendor-calendar"] [data-theme="light"] .calendar-option:hover,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .calendar-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

body[data-page="vendor-calendar"] [data-theme="light"] .calendar-option-name,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .calendar-option-name {
    color: rgba(0, 0, 0, 0.9);
}

body[data-page="vendor-calendar"] [data-theme="light"] .toggle-switch,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .toggle-switch {
    background: rgba(0, 0, 0, 0.15);
}

/* ============================================ */
/*         LOADING STATE                       */
/* ============================================ */

body[data-page="vendor-calendar"] .calendar-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

/* ============================================ */
/*         EVENT DETAIL MODAL                  */
/* ============================================ */

body[data-page="vendor-calendar"] .event-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

body[data-page="vendor-calendar"] .event-detail-modal.hidden {
    display: none;
}

body[data-page="vendor-calendar"] .event-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

body[data-page="vendor-calendar"] .event-detail-content {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    margin: var(--spacing-lg);
    padding: var(--spacing-xl) var(--spacing-2xl);
    overflow-y: auto;
}

body[data-page="vendor-calendar"] .event-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
}

body[data-page="vendor-calendar"] .event-detail-row {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
}

body[data-page="vendor-calendar"] .event-label {
    font-weight: 500;
}

body[data-page="vendor-calendar"] .event-value {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

body[data-page="vendor-calendar"] .calendar-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

body[data-page="vendor-calendar"] .event-detail-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
}

body[data-page="vendor-calendar"] .event-detail-actions .glass-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

body[data-page="vendor-calendar"] .glass-button.danger {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
}

body[data-page="vendor-calendar"] .glass-button.danger:hover {
    background: #e53935;
}

/* ============================================ */
/*         EVENT EDIT MODE                     */
/* ============================================ */

body[data-page="vendor-calendar"] .event-edit-mode .form-group {
    margin-bottom: var(--spacing-lg);
}

body[data-page="vendor-calendar"] .event-edit-mode .form-group.full-width {
    width: 100%;
}

body[data-page="vendor-calendar"] .event-edit-mode .form-group.full-width .form-input {
    width: 100%;
    max-width: 100%;
}

body[data-page="vendor-calendar"] .event-edit-mode .form-group label {
    display: block;
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

body[data-page="vendor-calendar"] .event-edit-mode .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

body[data-page="vendor-calendar"] .event-edit-mode .form-input,
body[data-page="vendor-calendar"] .event-edit-mode textarea.form-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1em;
    text-align: center;
}

body[data-page="vendor-calendar"] .event-edit-mode textarea.form-input {
    text-align: left;
    resize: vertical;
}

body[data-page="vendor-calendar"] .event-edit-mode .form-input:focus,
body[data-page="vendor-calendar"] .event-edit-mode textarea.form-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-calendar"] .event-edit-mode .form-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
}

/* ============================================ */
/*    LIGHT THEME - EVENT DETAIL MODAL         */
/* ============================================ */

body[data-page="vendor-calendar"] [data-theme="light"] .event-detail-content,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .event-detail-content {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body[data-page="vendor-calendar"] [data-theme="light"] .event-edit-mode .form-input,
body[data-page="vendor-calendar"] [data-theme="light"] .event-edit-mode textarea.form-input,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .event-edit-mode .form-input,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .event-edit-mode textarea.form-input {
    background: rgba(0, 0, 0, 0.05) !important;
    color: rgba(0, 0, 0, 0.9) !important;
}

/* ============================================ */
/*    DARK THEME - EVENT DETAIL MODAL          */
/* ============================================ */

body[data-page="vendor-calendar"] [data-theme="dark"] .event-detail-content,
body[data-page="vendor-calendar"] [data-theme="darkart"] .event-detail-content,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .event-detail-content {
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-page="vendor-calendar"] [data-theme="dark"] .event-edit-mode .form-input,
body[data-page="vendor-calendar"] [data-theme="dark"] .event-edit-mode textarea.form-input,
body[data-page="vendor-calendar"] [data-theme="darkart"] .event-edit-mode .form-input,
body[data-page="vendor-calendar"] [data-theme="darkart"] .event-edit-mode textarea.form-input,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .event-edit-mode .form-input,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .event-edit-mode textarea.form-input {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
}

/* Calendar option selected state */
body[data-page="vendor-calendar"] .calendar-option.selected {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

body[data-page="vendor-calendar"] .calendar-option.selected .calendar-option-name {
    color: white !important;
}

/* ============================================ */
/*    EDIT MODE CALENDAR DROPDOWN              */
/* ============================================ */

body[data-page="vendor-calendar"] #editCalendarDropdownTrigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
}

body[data-page="vendor-calendar"] #editCalendarDropdownTrigger:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-calendar"] #editCalendarDropdown .calendar-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: var(--spacing-xs);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

body[data-page="vendor-calendar"] #editCalendarDropdown .calendar-dropdown-menu.open {
    display: block;
}

body[data-page="vendor-calendar"] #editCalendarDropdown {
    position: relative;
}

/* Light theme edit dropdown */
body[data-page="vendor-calendar"] [data-theme="light"] #editCalendarDropdownTrigger,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] #editCalendarDropdownTrigger {
    background: rgba(0, 0, 0, 0.05);
}

body[data-page="vendor-calendar"] [data-theme="light"] #editCalendarDropdown .calendar-dropdown-menu,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] #editCalendarDropdown .calendar-dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
}

/* Dark theme edit dropdown */
body[data-page="vendor-calendar"] [data-theme="dark"] #editCalendarDropdownTrigger,
body[data-page="vendor-calendar"] [data-theme="darkart"] #editCalendarDropdownTrigger,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] #editCalendarDropdownTrigger {
    background: rgba(255, 255, 255, 0.08);
}

body[data-page="vendor-calendar"] [data-theme="dark"] #editCalendarDropdown .calendar-dropdown-menu,
body[data-page="vendor-calendar"] [data-theme="darkart"] #editCalendarDropdown .calendar-dropdown-menu,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] #editCalendarDropdown .calendar-dropdown-menu {
    background: rgba(30, 30, 40, 0.98);
}

/* ============================================ */
/*         RESPONSIVE (<48em)                  */
/*         (extracted from HTML)               */
/* ============================================ */

@media (max-width: 48em) {
    body[data-page="vendor-calendar"] .calendar-page {
        padding: var(--spacing-sm);
    }

    body[data-page="vendor-calendar"] .calendar-actions {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    body[data-page="vendor-calendar"] .calendar-wrapper {
        padding: var(--spacing-md);
    }

    body[data-page="vendor-calendar"] .calendar-container {
        height: calc(100vh - 160px);
    }

    body[data-page="vendor-calendar"] .calendar-container .fc-toolbar {
        flex-direction: column;
        gap: 0.5em;
    }

    body[data-page="vendor-calendar"] .calendar-container .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }

    body[data-page="vendor-calendar"] .create-event-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================ */
/*    THEME-SPECIFIC CALENDAR WRAPPER          */
/* ============================================ */

body[data-page="vendor-calendar"] [data-theme="light"] .calendar-wrapper {
    background: rgba(255, 255, 255, 0.75);
}

body[data-page="vendor-calendar"] [data-theme="dark"] .calendar-wrapper {
    background: rgba(30, 30, 35, 0.85);
}

/* ============================================ */
/*    FULLCALENDAR THEME-SPECIFIC TEXT COLORS   */
/* ============================================ */

/* Light themes: ensure dark text on light backgrounds */
body[data-page="vendor-calendar"] [data-theme="light"] .calendar-container .fc-button,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .calendar-container .fc-button {
    color: var(--text-primary);
}

body[data-page="vendor-calendar"] [data-theme="light"] .calendar-container .fc-button:disabled,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .calendar-container .fc-button:disabled {
    color: var(--text-tertiary);
    background: var(--glass-primary);
}

body[data-page="vendor-calendar"] [data-theme="light"] .calendar-container .fc-timegrid-axis-cushion,
body[data-page="vendor-calendar"] [data-theme="light"] .calendar-container .fc-timegrid-slot-label-cushion,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .calendar-container .fc-timegrid-axis-cushion,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .calendar-container .fc-timegrid-slot-label-cushion {
    color: var(--text-secondary);
}

body[data-page="vendor-calendar"] [data-theme="light"] .calendar-container .fc-list-day-cushion,
body[data-page="vendor-calendar"] [data-theme="light"] .calendar-container .fc-cell-shaded,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .calendar-container .fc-list-day-cushion,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .calendar-container .fc-cell-shaded {
    color: var(--text-primary);
    background: var(--glass-primary);
}

body[data-page="vendor-calendar"] [data-theme="light"] .calendar-container .fc-daygrid-day-events,
body[data-page="vendor-calendar"] [data-theme="lightmodern"] .calendar-container .fc-daygrid-day-events {
    color: var(--text-primary);
}

/* Dark themes: ensure light text on dark backgrounds */
body[data-page="vendor-calendar"] [data-theme="dark"] .calendar-container .fc-button,
body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-button,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .calendar-container .fc-button {
    color: var(--text-primary);
}

body[data-page="vendor-calendar"] [data-theme="dark"] .calendar-container .fc-button:disabled,
body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-button:disabled,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .calendar-container .fc-button:disabled {
    color: var(--text-tertiary);
    background: var(--glass-primary);
}

body[data-page="vendor-calendar"] [data-theme="dark"] .calendar-container .fc-timegrid-axis-cushion,
body[data-page="vendor-calendar"] [data-theme="dark"] .calendar-container .fc-timegrid-slot-label-cushion,
body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-timegrid-axis-cushion,
body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-timegrid-slot-label-cushion,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .calendar-container .fc-timegrid-axis-cushion,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .calendar-container .fc-timegrid-slot-label-cushion {
    color: var(--text-secondary);
}

body[data-page="vendor-calendar"] [data-theme="dark"] .calendar-container .fc-list-day-cushion,
body[data-page="vendor-calendar"] [data-theme="dark"] .calendar-container .fc-cell-shaded,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .calendar-container .fc-list-day-cushion,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .calendar-container .fc-cell-shaded {
    color: var(--text-primary) !important;
    background: var(--glass-secondary);
}

/* Darkart list view - explicit warm white colors */
body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-list-day-cushion,
body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-cell-shaded {
    color: rgba(250, 245, 239, 0.95) !important;
    background: rgba(250, 245, 239, 0.1) !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-list-day-cushion a,
body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-list-day-text,
body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-list-day a {
    color: rgba(250, 245, 239, 0.95) !important;
    text-decoration: none !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-list-day-side-text {
    color: rgba(250, 245, 239, 0.75) !important;
}

body[data-page="vendor-calendar"] [data-theme="dark"] .calendar-container .fc-daygrid-day-events,
body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-daygrid-day-events,
body[data-page="vendor-calendar"] [data-theme="darkmodern"] .calendar-container .fc-daygrid-day-events {
    color: var(--text-primary);
}

/* ============================================ */
/*    DARKART THEME - CONTAINER COLORS         */
/* ============================================ */

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-wrapper {
    background: rgba(20, 20, 30, 0.75);
    border-color: rgba(255, 255, 255, 0.15);
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .action-btn {
    background: rgba(20, 20, 30, 0.6);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(250, 245, 239, 0.95);
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .action-btn:hover {
    background: rgba(40, 40, 55, 0.75);
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-button {
    background: rgba(20, 20, 30, 0.6);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(250, 245, 239, 0.95);
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-button:hover {
    background: rgba(40, 40, 55, 0.75);
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-col-header-cell {
    background: rgba(20, 20, 30, 0.5);
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-col-header-cell-cushion {
    color: rgba(250, 245, 239, 0.87);
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-daygrid-day-number {
    color: rgba(250, 245, 239, 0.95);
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-toolbar-title {
    color: rgba(250, 245, 239, 0.95);
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-theme-standard {
    --fc-border-color: rgba(255, 255, 255, 0.15);
    --fc-neutral-bg-color: rgba(20, 20, 30, 0.5);
}

/* ============================================ */
/*    DARKART - MULTI-MONTH YEAR VIEW          */
/* ============================================ */

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth-month {
    background: rgba(20, 20, 30, 0.75);
    border-color: rgba(255, 255, 255, 0.15);
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth-header {
    background: rgba(255, 255, 255, 0.05);
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth-title {
    color: rgba(250, 245, 239, 0.95) !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-col-header-cell-cushion {
    color: rgba(250, 245, 239, 0.75) !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-daygrid-day-number {
    color: rgba(250, 245, 239, 0.95) !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-event-title {
    color: rgba(250, 245, 239, 0.95) !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-day-other .fc-daygrid-day-number {
    color: rgba(250, 245, 239, 0.4) !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-daygrid-week-number {
    color: rgba(250, 245, 239, 0.5) !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-daygrid-day {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(20, 20, 30, 0.6) !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-daygrid-day-frame {
    background: transparent !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-daygrid-day-bg {
    background: transparent !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-scrollgrid {
    background: rgba(20, 20, 30, 0.5) !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-scrollgrid-section,
body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-scrollgrid-section > td,
body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-scrollgrid-section > th {
    background: transparent !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-day-other {
    background: rgba(20, 20, 30, 0.4) !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth .fc-day-today {
    background: rgba(0, 122, 255, 0.2) !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth td,
body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth th {
    background: transparent !important;
}

body[data-page="vendor-calendar"] [data-theme="darkart"] .calendar-container .fc-multimonth-daygrid {
    background: rgba(20, 20, 30, 0.5) !important;
}

/* COEUS — vendor-profile.css — Extracted from vendor-profile.html */

/* Live Edit Profile Styles */
.profile-edit-container {
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-lg);
    transition: color 0.2s ease;
}
.back-link:hover { color: var(--text-primary); }

/* Hero Section - LinkedIn style banner with glass card */
.edit-hero {
    position: relative;
    margin-bottom: var(--spacing-xl);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.edit-banner {
    height: 22em;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(168, 85, 247, 0.3) 50%, rgba(236, 72, 153, 0.2) 100%);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.edit-banner img {
    position: absolute;
    display: block;
}
.edit-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 6;
}
.edit-banner:hover .edit-banner-overlay { opacity: 1; }
.edit-overlay-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.5em 1em;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(0, 0, 0, 0.5);
    color: var(--button-text-on-color);
    font-size: 0.8125em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    backdrop-filter: blur(6px);
}
.edit-overlay-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: var(--text-tertiary);
}

.edit-hero-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-xl);
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
    z-index: 5;
}

/* Banner reposition toolbar */
.banner-reposition-toolbar {
    position: absolute;
    bottom: var(--spacing-sm);
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-full);
    z-index: 10;
    backdrop-filter: blur(10px);
}
.banner-reposition-toolbar.visible { display: flex; }
.banner-reposition-toolbar button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: var(--button-text-on-color);
    cursor: pointer;
    font-size: 1em;
    transition: background 0.15s;
}
.banner-reposition-toolbar button:hover { background: rgba(255, 255, 255, 0.3); }
.banner-reposition-toolbar .banner-zoom-label {
    color: var(--text-secondary);
    font-size: 0.75em;
    min-width: 2.5em;
    text-align: center;
    user-select: none;
}
.banner-reposition-toolbar .banner-save-btn {
    width: auto;
    border-radius: var(--radius-full);
    padding: 0.3em 0.8em;
    font-size: 0.75em;
    font-weight: 600;
    background: var(--ios-system-orange);
}
.banner-reposition-toolbar .banner-save-btn:hover { background: #0066d6; }

.edit-banner.repositioning { cursor: grab; }
.edit-banner.repositioning:active { cursor: grabbing; }
.edit-banner.repositioning .edit-banner-overlay { display: none; }

.edit-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 11.25em;
    height: 11.25em;
}
.edit-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.25);
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #48dbfb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    cursor: pointer;
}
.edit-avatar {
    position: relative;
}
.edit-avatar img {
    position: absolute;
    display: block;
}
.edit-avatar-initials {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}
.edit-avatar-overlay {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    opacity: 0;
    transition: opacity 0.2s;
    cursor: default;
}
.edit-avatar-overlay .edit-overlay-btn {
    font-size: 0.625em;
    padding: 0.4em 0.7em;
}
.edit-avatar-wrapper:hover .edit-avatar-overlay { opacity: 1; }
.edit-avatar-wrapper.repositioning .edit-avatar-overlay { display: none; }
.edit-avatar.repositioning { cursor: grab; }
.edit-avatar.repositioning:active { cursor: grabbing; }

/* Avatar reposition toolbar — in-flow between banner and grid */
.avatar-reposition-toolbar {
    display: none;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0, 0, 0, 0.85);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    margin: var(--spacing-sm) auto;
    width: fit-content;
}
.avatar-reposition-toolbar.visible { display: flex; flex-direction: row; }
.avatar-toolbar-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}
.avatar-toolbar-divider {
    width: 1px;
    height: 1.5em;
    background: rgba(255, 255, 255, 0.2);
}
.avatar-reposition-toolbar button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75em;
    height: 1.75em;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: var(--button-text-on-color);
    cursor: pointer;
    font-size: 0.875em;
    transition: background 0.15s;
}
.avatar-reposition-toolbar button:hover { background: rgba(255, 255, 255, 0.3); }
.avatar-reposition-toolbar .avatar-zoom-label {
    color: var(--text-secondary);
    font-size: 0.7em;
    min-width: 2.25em;
    text-align: center;
    user-select: none;
}
.avatar-reposition-toolbar .avatar-toolbar-save {
    width: auto;
    border-radius: var(--radius-full);
    padding: 0.3em 0.8em;
    font-size: 0.75em;
    font-weight: 600;
    background: var(--ios-system-orange);
}
.avatar-reposition-toolbar .avatar-toolbar-save:hover { background: #0066d6; }

/* Avatar color swatches */
.avatar-color-swatches {
    display: flex;
    align-items: center;
    gap: 0.3em;
}
.avatar-color-swatch {
    width: 1.25em;
    height: 1.25em;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
    padding: 0;
    display: block;
    flex-shrink: 0;
}
.avatar-color-swatch:hover { transform: scale(1.15); border-color: var(--text-tertiary); }
.avatar-color-swatch.active { border-color: var(--ios-system-orange); transform: scale(1.15); }
.avatar-color-swatch--transparent {
    background: conic-gradient(#ccc 25%, #fff 25% 50%, #ccc 50% 75%, #fff 75%);
    background-size: 0.5em 0.5em;
}
.avatar-color-swatch--white { background: #ffffff; }
.avatar-color-swatch--black { background: #000000; }
.avatar-color-swatch--gray { background: #e5e7eb; }
.avatar-color-swatch--blue { background: #3b82f6; }
.avatar-color-swatch--green { background: #22c55e; }
.avatar-color-custom {
    position: relative;
    overflow: hidden;
    background: conic-gradient(#f87171, #fbbf24, #34d399, #60a5fa, #a78bfa, #f87171);
}
.avatar-color-custom input[type="color"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
}

.edit-hero-name-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    flex: 1;
    min-width: 0;
}

/* Editable name field */
.edit-name-field {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}
.edit-name-input {
    font-size: 1.25em;
    font-weight: 600;
    color: var(--button-text-on-color);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: var(--spacing-xs) 0;
    width: 100%;
    max-width: 400px;
    transition: border-color 0.2s;
}
.edit-name-input::placeholder { color: var(--text-tertiary); }
.edit-name-input:hover { border-bottom-color: var(--text-quaternary); }
.edit-name-input:focus {
    outline: none;
    border-bottom-color: var(--ios-system-orange);
}

/* Location row */
.edit-location-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.875em;
    white-space: nowrap;
}
.edit-location-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Profile Grid */
.edit-profile-grid {
    display: grid;
    gap: var(--spacing-xl);
    grid-template-columns: 1fr;
}
@media (min-width: 64em) {
    .edit-profile-grid {
        grid-template-columns: 320px 1fr;
    }
}

/* Sidebar */
.edit-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.edit-card {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    backdrop-filter: blur(20px);
}

.edit-card-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Contact fields */
.edit-contact-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}
.edit-contact-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}
.edit-contact-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}
.edit-contact-input {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    transition: border-color 0.2s, background 0.2s;
}
.edit-contact-input:hover {
    background: var(--glass-hover);
}
.edit-contact-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

/* Address grid */
.edit-address-grid {
    display: grid;
    gap: var(--spacing-sm);
}
.edit-address-row {
    display: grid;
    gap: var(--spacing-sm);
    grid-template-columns: 1fr 1fr;
}
.edit-address-row-wide {
    grid-template-columns: 2fr 1fr;
}

/* Categories */
.edit-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}
.edit-category-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}
.edit-category-remove {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}
.edit-category-remove:hover { color: var(--ios-system-red); }
.edit-add-category {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: transparent;
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s;
}
.edit-add-category:hover {
    border-color: var(--ios-system-orange);
    color: var(--ios-system-orange);
}

/* Main content */
.edit-main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

/* Rich Text Editor */
.rich-editor-wrapper {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
    padding: var(--spacing-sm);
    background: var(--glass-secondary);
    border-bottom: 1px solid var(--glass-border);
}

.rich-editor-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.rich-editor-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}
.rich-editor-btn.active {
    background: var(--ios-system-orange);
    color: var(--text-primary);
}

.rich-editor-select {
    height: 32px;
    padding: 0 var(--spacing-sm);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.75em;
    cursor: pointer;
    transition: border-color 0.15s;
}
.rich-editor-select:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}
.rich-editor-select option {
    background: var(--glass-secondary);
    color: var(--text-primary);
}

.rich-editor-separator {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
    margin: 4px 6px;
}

.rich-editor-content {
    min-height: 200px;
    padding: var(--spacing-lg);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    line-height: 1.7;
    outline: none;
}
.rich-editor-content:focus {
    background: var(--glass-secondary);
}
/* Force all text elements to use theme color */
.rich-editor-content,
.rich-editor-content * {
    color: var(--text-primary) !important;
}
.rich-editor-content p { margin-bottom: 1em; }
.rich-editor-content h1 { font-size: 2em; font-weight: 700; margin-bottom: 0.5em; }
.rich-editor-content h2 { font-size: 1.5em; font-weight: 600; margin-bottom: 0.5em; }
.rich-editor-content h3 { font-size: 1.25em; font-weight: 600; margin-bottom: 0.5em; }
.rich-editor-content h4 { font-size: 1.1em; font-weight: 600; margin-bottom: 0.5em; }
.rich-editor-content blockquote {
    border-left: 3px solid var(--ios-system-orange);
    padding-left: 1em;
    margin: 0.5em 0 1em;
    font-style: italic;
    opacity: 0.85;
}
.rich-editor-content ul, .rich-editor-content ol { padding-left: 1.5em; margin-bottom: 1em; }
.rich-editor-content li { margin-bottom: 0.25em; }
.rich-editor-content:empty::before {
    content: attr(placeholder);
    color: var(--text-tertiary) !important;
    pointer-events: none;
}

/* Preview button */
.glass-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.glass-button:hover {
    background: var(--glass-hover);
}

/* Services */
.edit-services-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}
.edit-service-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    gap: var(--spacing-md);
    align-items: center;
    padding: var(--spacing-md);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}
.edit-service-name {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-weight: 500;
}
.edit-service-name:focus { outline: none; }
.edit-service-type {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    min-width: 120px;
}
.edit-service-type:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}
.edit-service-type option {
    background: var(--glass-secondary);
    color: var(--text-primary);
}
.edit-service-mwst {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    min-width: 90px;
}
.edit-service-mwst:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}
.edit-service-mwst option {
    background: var(--glass-secondary);
    color: var(--text-primary);
}
.edit-service-price {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}
.edit-service-price-input {
    width: 80px;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--ios-system-green);
    font-weight: 600;
    text-align: right;
}
.edit-service-price-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}
.edit-service-suffix {
    min-width: 50px;
    text-align: left;
}
.edit-service-remove {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: var(--spacing-xs);
}
.edit-service-remove:hover { color: var(--ios-system-red); }
.edit-add-service {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: transparent;
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s;
}
.edit-add-service:hover {
    border-color: var(--ios-system-orange);
    color: var(--ios-system-orange);
}

/* Save bar */
.edit-save-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-primary);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    padding: var(--spacing-md) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    z-index: 100;
}
.edit-save-bar .glass-button {
    min-width: 120px;
}

/* Hidden file inputs */
.hidden-input { display: none; }

/* Loading overlay */
.edit-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.edit-loading-overlay.hidden { display: none; }

/* Category modal */
.category-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 150;
    padding: var(--spacing-lg);
}
.category-modal.hidden { display: none; }
.category-modal-content {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
}
.category-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}
.category-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}
.category-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
}
.category-group-header {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-xs);
    margin-top: var(--spacing-sm);
    border-bottom: 1px solid var(--glass-border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.category-group-header:first-child {
    margin-top: 0;
}
.category-list-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    padding-left: var(--spacing-lg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-primary);
}
.category-list-item:hover { background: var(--glass-hover); }
.category-list-item.selected { background: rgba(0, 122, 255, 0.1); }
.category-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--glass-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.category-list-item.selected .category-checkbox {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
}

/**
 * @file eigentuemer-dashboard.css
 * @filepath public/css/pages/eigentuemer-dashboard.css
 * @description Premium Eigentümer dashboard — Swiss luxury property aesthetic.
 *   Refined glass cards with colored accent edges, staggered entrance animation,
 *   elegant typography, and polished stat display.
 * @created 2026-02-15
 * @updated 2026-02-16 — Complete redesign: premium stat cards with accent bars,
 *   staggered @keyframe entrances, two-column detail panels, quick-nav grid,
 *   BEM naming (.eig-stat-card__*), all 5 themes via CSS variables.
 *
 * <file_documentation>
 *   <purpose>
 *     Dashboard layout for property co-owners (Stockwerkeigentümer) showing
 *     financial overview, upcoming votes, reserve fund status, and quick links.
 *   </purpose>
 *   <theme_support>All 5 themes via CSS variables</theme_support>
 *   <dependencies>core/variables-v2.css, core/themes-v2.css</dependencies>
 * </file_documentation>
 */

/* ============================================================================
   PAGE SCROLL FIX
   ============================================================================ */

body[data-page="eigentuemer-dashboard"] {
    overflow-x: hidden;
    overflow-y: scroll;
    height: auto;
    min-height: 100vh;
    overscroll-behavior: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
}

body[data-page="eigentuemer-dashboard"] .app-container {
    min-height: 100vh;
    height: auto;
    overflow-y: visible;
    overscroll-behavior: auto;
}

/* ============================================================================
   ENTRANCE ANIMATION
   ============================================================================ */

@keyframes eig-fade-rise {
    from {
        opacity: 0;
        transform: translateY(1.25em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   PAGE CONTAINER
   ============================================================================ */

body[data-page="eigentuemer-dashboard"] .eig-page {
    padding: 2em 1.5em 3em;
    max-width: 76em;
    margin: 0 auto;
}

/* ============================================================================
   WELCOME HEADER
   ============================================================================ */

body[data-page="eigentuemer-dashboard"] .eig-welcome {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2.25em;
    padding-bottom: 1.5em;
    border-bottom: 1px solid var(--glass-border);
    animation: eig-fade-rise 0.6s ease-out both;
}

body[data-page="eigentuemer-dashboard"] .eig-welcome-greeting {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 0.375em;
}

body[data-page="eigentuemer-dashboard"] .eig-welcome-name {
    font-family: var(--font-serif);
    font-size: 2em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

body[data-page="eigentuemer-dashboard"] .eig-welcome-meta {
    text-align: right;
    flex-shrink: 0;
}

body[data-page="eigentuemer-dashboard"] .eig-welcome-date {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 400;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

/* ============================================================================
   STAT CARDS ROW — 4 premium cards in a row
   ============================================================================ */

body[data-page="eigentuemer-dashboard"] .eig-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em;
    margin-bottom: 2em;
}

/* ============================================================================
   STAT CARD — glass card with colored left accent bar
   ============================================================================ */

body[data-page="eigentuemer-dashboard"] .eig-stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: eig-fade-rise 0.5s ease-out both;
}

body[data-page="eigentuemer-dashboard"] .eig-stat-card:nth-child(1) { animation-delay: 0.08s; }
body[data-page="eigentuemer-dashboard"] .eig-stat-card:nth-child(2) { animation-delay: 0.16s; }
body[data-page="eigentuemer-dashboard"] .eig-stat-card:nth-child(3) { animation-delay: 0.24s; }
body[data-page="eigentuemer-dashboard"] .eig-stat-card:nth-child(4) { animation-delay: 0.32s; }

body[data-page="eigentuemer-dashboard"] a.eig-stat-card:hover {
    transform: translateY(-0.1875em);
    border-color: var(--glass-border-hover);
    box-shadow: 0 0.5em 2em rgba(0, 0, 0, 0.08);
}

/* Accent bar — 3px colored strip at top of card */
body[data-page="eigentuemer-dashboard"] .eig-stat-card__accent {
    height: 0.1875em;
    width: 100%;
    flex-shrink: 0;
}

body[data-page="eigentuemer-dashboard"] .eig-stat-card--objekte .eig-stat-card__accent {
    background: var(--ios-system-orange);
}

body[data-page="eigentuemer-dashboard"] .eig-stat-card--nebenkosten .eig-stat-card__accent {
    background: var(--ios-system-green);
}

body[data-page="eigentuemer-dashboard"] .eig-stat-card--abstimmungen .eig-stat-card__accent {
    background: var(--ios-system-orange);
}

body[data-page="eigentuemer-dashboard"] .eig-stat-card--fonds .eig-stat-card__accent {
    background: var(--ios-system-purple);
}

/* Card body — main content area */
body[data-page="eigentuemer-dashboard"] .eig-stat-card__body {
    padding: 1.25em 1.25em 1em;
    flex: 1;
}

/* Card header row (label + icon) */
body[data-page="eigentuemer-dashboard"] .eig-stat-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.875em;
}

body[data-page="eigentuemer-dashboard"] .eig-stat-card__label {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

body[data-page="eigentuemer-dashboard"] .eig-stat-card__icon {
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-secondary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

body[data-page="eigentuemer-dashboard"] .eig-stat-card__icon svg {
    width: 1em;
    height: 1em;
}

/* Colored icon backgrounds per card variant */
body[data-page="eigentuemer-dashboard"] .eig-stat-card--objekte .eig-stat-card__icon {
    background: rgba(var(--ios-blue-rgb), 0.1);
    color: var(--ios-system-orange);
}

body[data-page="eigentuemer-dashboard"] .eig-stat-card--nebenkosten .eig-stat-card__icon {
    background: rgba(var(--ios-green-rgb), 0.1);
    color: var(--ios-system-green);
}

body[data-page="eigentuemer-dashboard"] .eig-stat-card--abstimmungen .eig-stat-card__icon {
    background: rgba(var(--ios-orange-rgb), 0.1);
    color: var(--ios-system-orange);
}

body[data-page="eigentuemer-dashboard"] .eig-stat-card--fonds .eig-stat-card__icon {
    background: rgba(175, 82, 222, 0.1);
    color: var(--ios-system-purple);
}

/* Big stat number */
body[data-page="eigentuemer-dashboard"] .eig-stat-card__value {
    font-family: var(--font-serif);
    font-size: 2em;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.125em;
}

/* Sublabel beneath the number */
body[data-page="eigentuemer-dashboard"] .eig-stat-card__sub {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-tertiary);
    letter-spacing: 0.01em;
}

/* Arrow indicator for clickable cards */
body[data-page="eigentuemer-dashboard"] .eig-stat-card__arrow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1.25em 1em;
    color: var(--text-quaternary);
    transition: color 0.2s ease, transform 0.2s ease;
}

body[data-page="eigentuemer-dashboard"] .eig-stat-card__arrow svg {
    width: 1em;
    height: 1em;
}

body[data-page="eigentuemer-dashboard"] a.eig-stat-card:hover .eig-stat-card__arrow {
    color: var(--text-secondary);
    transform: translateX(0.25em);
}

/* ============================================================================
   DETAIL ROW — two-column layout for lists
   ============================================================================ */

body[data-page="eigentuemer-dashboard"] .eig-detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    animation: eig-fade-rise 0.5s ease-out 0.4s both;
}

/* ============================================================================
   DETAIL PANEL — glass card section with header
   ============================================================================ */

body[data-page="eigentuemer-dashboard"] .eig-detail-panel {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="eigentuemer-dashboard"] .eig-detail-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body[data-page="eigentuemer-dashboard"] .eig-detail-panel__title {
    font-family: var(--font-serif);
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

body[data-page="eigentuemer-dashboard"] .eig-detail-panel__link {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    color: var(--ios-system-orange);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity 0.2s ease;
}

body[data-page="eigentuemer-dashboard"] .eig-detail-panel__link:hover {
    opacity: 0.7;
}

/* ============================================================================
   VOTES LIST
   ============================================================================ */

body[data-page="eigentuemer-dashboard"] .eig-votes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    max-height: 20em;
    overflow-y: auto;
}

body[data-page="eigentuemer-dashboard"] .eig-vote-item {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em 1em;
    background: var(--glass-secondary);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

body[data-page="eigentuemer-dashboard"] .eig-vote-item:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border);
}

body[data-page="eigentuemer-dashboard"] .eig-vote-dot {
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    flex-shrink: 0;
}

body[data-page="eigentuemer-dashboard"] .eig-vote-dot.active { background: var(--ios-system-green); }
body[data-page="eigentuemer-dashboard"] .eig-vote-dot.pending { background: var(--ios-system-orange); }
body[data-page="eigentuemer-dashboard"] .eig-vote-dot.upcoming { background: var(--ios-system-orange); }

body[data-page="eigentuemer-dashboard"] .eig-vote-info {
    flex: 1;
    min-width: 0;
}

body[data-page="eigentuemer-dashboard"] .eig-vote-title {
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="eigentuemer-dashboard"] .eig-vote-deadline {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
    margin-top: 0.125em;
}

body[data-page="eigentuemer-dashboard"] .eig-vote-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1875em 0.625em;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    flex-shrink: 0;
}

body[data-page="eigentuemer-dashboard"] .eig-vote-badge.needs-vote {
    background: rgba(var(--ios-orange-rgb), 0.12);
    color: var(--ios-system-orange);
}

body[data-page="eigentuemer-dashboard"] .eig-vote-badge.voted {
    background: rgba(var(--ios-green-rgb), 0.12);
    color: var(--ios-system-green);
}

/* ============================================================================
   MESSAGES LIST
   ============================================================================ */

body[data-page="eigentuemer-dashboard"] .eig-messages-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    max-height: 12em;
    overflow-y: auto;
}

body[data-page="eigentuemer-dashboard"] .eig-message-item {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.625em 0.875em;
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease;
}

body[data-page="eigentuemer-dashboard"] .eig-message-item:hover {
    background: var(--glass-hover);
}

body[data-page="eigentuemer-dashboard"] .eig-message-info {
    flex: 1;
    min-width: 0;
}

body[data-page="eigentuemer-dashboard"] .eig-message-sender {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-primary);
}

body[data-page="eigentuemer-dashboard"] .eig-message-preview {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="eigentuemer-dashboard"] .eig-message-time {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-quaternary);
    flex-shrink: 0;
    margin-left: auto;
}

body[data-page="eigentuemer-dashboard"] .eig-message-unread-dot {
    width: 0.375em;
    height: 0.375em;
    border-radius: 50%;
    background: var(--ios-system-orange);
    flex-shrink: 0;
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

body[data-page="eigentuemer-dashboard"] .eig-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5em 1em;
    text-align: center;
    gap: 0.75em;
}

body[data-page="eigentuemer-dashboard"] .eig-empty__icon {
    width: 2.5em;
    height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-secondary);
    border-radius: 50%;
    color: var(--text-quaternary);
}

body[data-page="eigentuemer-dashboard"] .eig-empty__icon svg {
    width: 1.25em;
    height: 1.25em;
}

body[data-page="eigentuemer-dashboard"] .eig-empty__text {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-tertiary);
    margin: 0;
}

/* ============================================================================
   QUICK NAVIGATION — 4-item compact grid
   ============================================================================ */

body[data-page="eigentuemer-dashboard"] .eig-quick-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5em;
    margin-top: auto;
    padding-top: 1em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="eigentuemer-dashboard"] .eig-quick-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375em;
    padding: 0.75em 0.25em;
    background: var(--glass-secondary);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-secondary);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body[data-page="eigentuemer-dashboard"] .eig-quick-nav__item:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

body[data-page="eigentuemer-dashboard"] .eig-quick-nav__item svg {
    width: 1.25em;
    height: 1.25em;
}

body[data-page="eigentuemer-dashboard"] .eig-quick-nav__item span {
    font-family: var(--font-sans);
    font-size: 0.625em;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.02em;
}

/* ============================================================================
   RESPONSIVE — Tablet
   ============================================================================ */

@media (max-width: 64em) {
    body[data-page="eigentuemer-dashboard"] .eig-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================================
   RESPONSIVE — Mobile
   ============================================================================ */

@media (max-width: 48em) {
    body[data-page="eigentuemer-dashboard"] .eig-page {
        padding: 1.25em 0.875em 2em;
    }

    body[data-page="eigentuemer-dashboard"] .eig-welcome {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
        margin-bottom: 1.5em;
        padding-bottom: 1em;
    }

    body[data-page="eigentuemer-dashboard"] .eig-welcome-name {
        font-size: 1.625em;
    }

    body[data-page="eigentuemer-dashboard"] .eig-welcome-meta {
        text-align: left;
    }

    body[data-page="eigentuemer-dashboard"] .eig-stats-row {
        grid-template-columns: 1fr;
        gap: 0.75em;
    }

    body[data-page="eigentuemer-dashboard"] .eig-stat-card__value {
        font-size: 1.625em;
    }

    body[data-page="eigentuemer-dashboard"] .eig-detail-row {
        grid-template-columns: 1fr;
    }

    body[data-page="eigentuemer-dashboard"] .eig-quick-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

/**
 * @file eigentuemer-abstimmungen.css
 * @filepath public/css/pages/eigentuemer-abstimmungen.css
 * @description Kanban board for Stockwerkeigentuemer voting/ballots.
 *   4-stage pipeline: Eingereicht -> Traktandiert -> Abstimmung lauft -> Abgeschlossen.
 *   Follows vendor-auftraege.css pattern with co-owner specific accent colors.
 *   Scoped to body[data-page="eigentuemer-abstimmungen"].
 * @created 2026-02-15
 *
 * <file_documentation>
 *   <purpose>
 *     Kanban board, vote cards, progress bars, result badges, detail modal,
 *     vote form, and mobile tab switcher for owner association ballots.
 *   </purpose>
 *   <theme_support>All 5 themes via CSS variables</theme_support>
 *   <dependencies>core/variables-v2.css, core/themes-v2.css</dependencies>
 * </file_documentation>
 */

/* ============================================================================
   PAGE-SCOPED STAGE COLORS
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] {
    --stage-eingereicht: var(--ios-system-orange);
    --stage-traktandiert: var(--ios-system-orange, #FF9500);
    --stage-laufend: #AF52DE;
    --stage-abgeschlossen: var(--ios-system-green, #34C759);

    --stage-eingereicht-rgb: 255, 149, 0;
    --stage-laufend-rgb: 175, 82, 222;
}

/* ============================================================================
   PAGE LAYOUT
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-abstimmungen-page {
    min-height: 100vh;
    padding: 1.5em;
    display: flex;
    flex-direction: column;
}

/* ============================================================================
   PAGE HEADER
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-abstimmungen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    margin-bottom: 1.5em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-abstimmungen-header-left {
    display: flex;
    align-items: center;
    gap: 1em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-abstimmungen-back-btn {
    display: flex;
    align-items: center;
    gap: 0.375em;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.375em 0.625em;
    border-radius: 0.5em;
    font-family: var(--font-sans);
    font-size: 0.875em;
    transition: color 0.2s, background 0.2s;
}

body[data-page="eigentuemer-abstimmungen"] .eig-abstimmungen-back-btn:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
}

body[data-page="eigentuemer-abstimmungen"] .eig-abstimmungen-title {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

body[data-page="eigentuemer-abstimmungen"] .eig-abstimmungen-actions {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-new-antrag-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 1.25em;
    border: none;
    border-radius: 999px;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 0.125em 0.5em rgba(var(--stage-eingereicht-rgb), 0.25);
}

body[data-page="eigentuemer-abstimmungen"] .eig-new-antrag-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 0.25em 1em rgba(var(--stage-eingereicht-rgb), 0.35);
}

/* ============================================================================
   MOBILE TAB SWITCHER
   Hidden on desktop, shows as tab bar <48em
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-mobile-tabs {
    display: none;
    overflow-x: auto;
    gap: 0.25em;
    margin-bottom: 1em;
    padding-bottom: 0.25em;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

body[data-page="eigentuemer-abstimmungen"] .eig-mobile-tabs::-webkit-scrollbar {
    display: none;
}

body[data-page="eigentuemer-abstimmungen"] .eig-mobile-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 1em;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-primary);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

body[data-page="eigentuemer-abstimmungen"] .eig-mobile-tab.active {
    color: var(--button-text-on-color);
    border-color: transparent;
}

body[data-page="eigentuemer-abstimmungen"] .eig-mobile-tab[data-stage="eingereicht"].active {
    background: var(--stage-eingereicht);
}

body[data-page="eigentuemer-abstimmungen"] .eig-mobile-tab[data-stage="traktandiert"].active {
    background: var(--stage-traktandiert);
}

body[data-page="eigentuemer-abstimmungen"] .eig-mobile-tab[data-stage="laufend"].active {
    background: var(--stage-laufend);
}

body[data-page="eigentuemer-abstimmungen"] .eig-mobile-tab[data-stage="abgeschlossen"].active {
    background: var(--stage-abgeschlossen);
}

body[data-page="eigentuemer-abstimmungen"] .eig-mobile-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25em;
    height: 1.25em;
    padding: 0 0.25em;
    border-radius: 50%;
    font-size: 0.85em;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.15);
    color: inherit;
}

/* ============================================================================
   KANBAN BOARD
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-kanban {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em;
    flex: 1;
    min-height: 0;
    align-items: start;
}

/* ============================================================================
   KANBAN COLUMN
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col {
    display: flex;
    flex-direction: column;
    min-height: 20em;
    border-radius: 0.75em;
    background: var(--glass-primary);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

/* ============================================================================
   COLUMN HEADER with COLORED ACCENT LINE
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875em 1em;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-secondary);
    position: relative;
}

/* Colored accent line at top of column */
body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="eingereicht"] .eig-kanban-header::before,
body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="traktandiert"] .eig-kanban-header::before,
body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="laufend"] .eig-kanban-header::before,
body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="abgeschlossen"] .eig-kanban-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 0.75em 0.75em 0 0;
}

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="eingereicht"] .eig-kanban-header::before {
    background: var(--stage-eingereicht);
}

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="traktandiert"] .eig-kanban-header::before {
    background: var(--stage-traktandiert);
}

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="laufend"] .eig-kanban-header::before {
    background: var(--stage-laufend);
}

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="abgeschlossen"] .eig-kanban-header::before {
    background: var(--stage-abgeschlossen);
}

body[data-page="eigentuemer-abstimmungen"] .eig-col-label {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

/* ============================================================================
   COLUMN COUNT BADGES
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    height: 1.5em;
    padding: 0 0.25em;
    border-radius: 50%;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 700;
    color: var(--button-text-on-color);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="eingereicht"] .eig-count {
    background: var(--stage-eingereicht);
}

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="traktandiert"] .eig-count {
    background: var(--stage-traktandiert);
}

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="laufend"] .eig-count {
    background: var(--stage-laufend);
}

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="abgeschlossen"] .eig-count {
    background: var(--stage-abgeschlossen);
}

/* ============================================================================
   KANBAN CARDS CONTAINER
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.625em;
    padding: 0.75em;
    overflow-y: auto;
    min-height: 0;
}

/* ============================================================================
   VOTE CARD
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-vote-card {
    position: relative;
    padding: 1em;
    border-radius: 0.625em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--glass-border);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    opacity: 0;
    animation: eigCardEnter 0.35s ease-out forwards;
    animation-delay: calc(var(--card-index, 0) * 60ms);
}

@keyframes eigCardEnter {
    from {
        opacity: 0;
        transform: translateY(1em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5em 1.5em rgba(0, 0, 0, 0.08);
}

/* Stage-specific left border colors */
body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="eingereicht"] .eig-vote-card {
    border-left-color: var(--stage-eingereicht);
}

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="traktandiert"] .eig-vote-card {
    border-left-color: var(--stage-traktandiert);
}

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="laufend"] .eig-vote-card {
    border-left-color: var(--stage-laufend);
}

body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col[data-stage="abgeschlossen"] .eig-vote-card {
    border-left-color: var(--stage-abgeschlossen);
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-card-title {
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.375em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-card-submitter {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-secondary);
    margin-bottom: 0.5em;
}

/* ============================================================================
   CATEGORY BADGES (small chips)
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em;
    margin-bottom: 0.5em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-category-badge {
    display: inline-flex;
    padding: 0.0625em 0.4375em;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.625em;
    font-weight: 500;
    background: var(--glass-secondary);
    color: var(--text-secondary);
}

/* ============================================================================
   VOTE PROGRESS BAR
   Horizontal bar with ja(green)/nein(red)/enthaltung(gray) segments
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-vote-progress {
    display: flex;
    height: 0.375em;
    border-radius: 999px;
    overflow: hidden;
    background: var(--glass-secondary);
    margin-bottom: 0.5em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-progress-ja {
    background: var(--ios-system-green);
    transition: width 0.3s ease;
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-progress-nein {
    background: var(--ios-system-red);
    transition: width 0.3s ease;
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-progress-enthaltung {
    background: var(--text-quaternary);
    transition: width 0.3s ease;
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-progress-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sans);
    font-size: 0.625em;
    color: var(--text-tertiary);
    margin-bottom: 0.375em;
}

/* ============================================================================
   RESULT BADGES
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-result-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125em 0.5em;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.625em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-result-badge.angenommen {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

body[data-page="eigentuemer-abstimmungen"] .eig-result-badge.abgelehnt {
    background: rgba(255, 59, 48, 0.15);
    color: var(--ios-system-red);
}

body[data-page="eigentuemer-abstimmungen"] .eig-result-badge.ungueltig {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
}

/* ============================================================================
   DEADLINE COUNTDOWN
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-deadline {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.25em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-deadline.urgent {
    color: var(--ios-system-red);
}

body[data-page="eigentuemer-abstimmungen"] .eig-deadline [data-icon] {
    font-size: 0.875em;
}

/* ============================================================================
   COLUMN EMPTY STATE
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-col-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2em 1em;
    text-align: center;
    color: var(--text-tertiary);
    gap: 0.5em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-col-empty [data-icon] {
    font-size: 1.75em;
    opacity: 0.6;
}

body[data-page="eigentuemer-abstimmungen"] .eig-col-empty-text {
    font-family: var(--font-sans);
    font-size: 0.75em;
    line-height: 1.4;
}

/* ============================================================================
   DETAIL MODAL
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(0.5em);
    -webkit-backdrop-filter: blur(0.5em);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-overlay.open {
    display: flex;
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-modal {
    width: 100%;
    max-width: 40em;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--glass-thick, var(--glass-primary));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl, 0 1.5em 3em rgba(0, 0, 0, 0.2));
    animation: eigModalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes eigModalEnter {
    from {
        opacity: 0;
        transform: translateY(2em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25em 1.5em 0.75em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-title {
    font-family: var(--font-serif);
    font-size: 1.125em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-close {
    width: 2em;
    height: 2em;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.25em 1.5em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-section {
    margin-bottom: 1.25em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-section:last-child {
    margin-bottom: 0;
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-section-title {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.625em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-description {
    font-family: var(--font-sans);
    font-size: 0.875em;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================================================
   VOTE FORM (radio buttons inside modal)
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-vote-form {
    display: flex;
    flex-direction: column;
    gap: 0.625em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-option {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-option:hover {
    background: var(--glass-hover);
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-option.selected {
    border-color: var(--ios-system-orange);
    background: rgba(var(--stage-eingereicht-rgb), 0.08);
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-radio {
    width: 1.125em;
    height: 1.125em;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    background: transparent;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s ease;
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-option.selected .eig-vote-radio {
    border-color: var(--ios-system-orange);
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-option.selected .eig-vote-radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--ios-system-orange);
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-option-label {
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 500;
    color: var(--text-primary);
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-submit {
    margin-top: 0.5em;
    padding: 0.625em 1.5em;
    border: none;
    border-radius: var(--radius-md);
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s;
    align-self: flex-end;
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-submit:hover {
    filter: brightness(1.1);
}

body[data-page="eigentuemer-abstimmungen"] .eig-vote-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================================
   DETAIL FOOTER
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-detail-footer {
    display: flex;
    gap: 0.625em;
    padding: 1em 1.5em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375em;
    padding: 0.625em 1em;
    border-radius: 0.5em;
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4em 2em;
    gap: 0.75em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-loading-spinner {
    width: 1.5em;
    height: 1.5em;
    border: 2px solid var(--glass-border);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: eigSpin 0.8s linear infinite;
}

@keyframes eigSpin {
    to { transform: rotate(360deg); }
}

body[data-page="eigentuemer-abstimmungen"] .eig-loading-text {
    font-family: var(--font-sans);
    font-size: 0.875em;
    color: var(--text-tertiary);
}

/* ============================================================================
   HIDDEN UTILITY
   ============================================================================ */

/* ============================================================================
   ASSOCIATION SELECTOR
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-association-select {
    padding: 0.5em 1em;
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    background: var(--glass-secondary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    cursor: pointer;
    transition: border-color 0.2s;
}

body[data-page="eigentuemer-abstimmungen"] .eig-association-select:focus {
    outline: none;
    border-color: var(--stage-eingereicht);
}

/* ============================================================================
   NEW PROPOSAL FORM
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-new-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-form-label {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-secondary);
}

body[data-page="eigentuemer-abstimmungen"] .eig-form-input,
body[data-page="eigentuemer-abstimmungen"] .eig-form-select,
body[data-page="eigentuemer-abstimmungen"] .eig-form-textarea {
    width: 100%;
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body[data-page="eigentuemer-abstimmungen"] .eig-form-input::placeholder,
body[data-page="eigentuemer-abstimmungen"] .eig-form-textarea::placeholder {
    color: var(--text-quaternary);
}

body[data-page="eigentuemer-abstimmungen"] .eig-form-input:focus,
body[data-page="eigentuemer-abstimmungen"] .eig-form-select:focus,
body[data-page="eigentuemer-abstimmungen"] .eig-form-textarea:focus {
    outline: none;
    border-color: var(--stage-eingereicht);
    box-shadow: 0 0 0 3px rgba(var(--stage-eingereicht-rgb), 0.15);
}

body[data-page="eigentuemer-abstimmungen"] .eig-form-textarea {
    resize: vertical;
    min-height: 5em;
    line-height: 1.5;
}

body[data-page="eigentuemer-abstimmungen"] .eig-majority-row {
    display: flex;
    gap: 0.5em;
    align-items: stretch;
}

body[data-page="eigentuemer-abstimmungen"] .eig-majority-row .eig-form-select {
    flex: 1;
}

body[data-page="eigentuemer-abstimmungen"] .eig-suggest-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.5em 0.75em;
    border: 1px solid rgba(var(--stage-laufend-rgb), 0.3);
    border-radius: 0.5em;
    background: rgba(var(--stage-laufend-rgb), 0.08);
    color: var(--stage-laufend);
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

body[data-page="eigentuemer-abstimmungen"] .eig-suggest-btn:hover {
    background: rgba(var(--stage-laufend-rgb), 0.15);
    border-color: var(--stage-laufend);
}

body[data-page="eigentuemer-abstimmungen"] .eig-suggest-btn [data-icon] {
    font-size: 1em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-majority-suggestion {
    margin-top: 0.5em;
    padding: 0.625em 0.75em;
    border-radius: 0.5em;
    background: rgba(var(--stage-laufend-rgb), 0.08);
    border: 1px solid rgba(var(--stage-laufend-rgb), 0.2);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================================================
   ATTACHMENT AREA
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-attachment-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 1.5em 1em;
    border: 1.5px dashed var(--glass-border);
    border-radius: 0.625em;
    background: var(--glass-primary);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s;
}

body[data-page="eigentuemer-abstimmungen"] .eig-attachment-area:hover {
    border-color: var(--stage-eingereicht);
    background: rgba(var(--stage-eingereicht-rgb), 0.04);
}

body[data-page="eigentuemer-abstimmungen"] .eig-attachment-area [data-icon] {
    font-size: 1.5em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-attachment-text {
    font-family: var(--font-sans);
    font-size: 0.8125em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-attachment-list {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
    margin-top: 0.5em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5em;
    padding: 0.375em 0.5em;
    border-radius: 0.375em;
    background: var(--glass-secondary);
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-secondary);
}

body[data-page="eigentuemer-abstimmungen"] .eig-attachment-remove {
    border: none;
    background: none;
    color: var(--ios-system-red);
    cursor: pointer;
    padding: 0.125em;
    font-size: 1em;
}

/* ============================================================================
   VOTE WEIGHT DISPLAY
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-vote-weight {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-tertiary);
    text-align: center;
    margin-bottom: 0.375em;
}

/* ============================================================================
   DETAIL INFO GRID
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.125em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-info-label {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-info-value {
    font-family: var(--font-sans);
    font-size: 0.9375em;
    color: var(--text-primary);
}

/* ============================================================================
   RESULTS BARS (in detail modal)
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-results {
    display: flex;
    flex-direction: column;
    gap: 0.625em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-result-row {
    display: flex;
    align-items: center;
    gap: 0.625em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-result-label {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 5.5em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-result-bar-wrap {
    flex: 1;
    height: 0.625em;
    border-radius: 999px;
    background: var(--glass-secondary);
    overflow: hidden;
}

body[data-page="eigentuemer-abstimmungen"] .eig-result-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease;
}

body[data-page="eigentuemer-abstimmungen"] .eig-result-bar.ja {
    background: var(--ios-system-green);
}

body[data-page="eigentuemer-abstimmungen"] .eig-result-bar.nein {
    background: var(--ios-system-red);
}

body[data-page="eigentuemer-abstimmungen"] .eig-result-bar.enthaltung {
    background: var(--text-quaternary);
}

body[data-page="eigentuemer-abstimmungen"] .eig-result-pct {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 3em;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body[data-page="eigentuemer-abstimmungen"] .eig-quorum-indicator {
    display: flex;
    align-items: center;
    gap: 0.375em;
    margin-top: 0.5em;
    font-family: var(--font-sans);
    font-size: 0.75em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-quorum-indicator.met {
    color: var(--ios-system-green);
}

body[data-page="eigentuemer-abstimmungen"] .eig-quorum-indicator.not-met {
    color: var(--ios-system-red);
}

/* ============================================================================
   AI SUGGESTION (in detail modal)
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-ai-suggestion {
    margin-top: 0.75em;
    padding: 0.75em;
    border-radius: 0.5em;
    background: rgba(var(--stage-laufend-rgb), 0.06);
    border: 1px solid rgba(var(--stage-laufend-rgb), 0.15);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-secondary);
    line-height: 1.5;
}

body[data-page="eigentuemer-abstimmungen"] .eig-ai-suggestion-label {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--stage-laufend);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25em;
}

/* ============================================================================
   STATUS ACTION BUTTONS (owner/admin only in detail modal)
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-status-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    padding-top: 0.75em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="eigentuemer-abstimmungen"] .eig-status-actions-title {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-action-row {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 1em;
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    background: var(--glass-primary);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

body[data-page="eigentuemer-abstimmungen"] .eig-action-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="eigentuemer-abstimmungen"] .eig-action-btn [data-icon] {
    font-size: 1em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body[data-page="eigentuemer-abstimmungen"] .eig-action-date {
    padding: 0.375em 0.625em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.375em;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-action-date:focus {
    outline: none;
    border-color: var(--stage-eingereicht);
}

/* Primary button variant in detail footer */
body[data-page="eigentuemer-abstimmungen"] .eig-detail-btn-primary {
    background: var(--ios-system-orange);
    border-color: var(--ios-system-orange);
    color: var(--button-text-on-color);
    box-shadow: 0 0.125em 0.5em rgba(var(--stage-eingereicht-rgb), 0.2);
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-btn-primary:hover {
    filter: brightness(1.1);
    color: var(--button-text-on-color);
    box-shadow: 0 0.25em 0.75em rgba(var(--stage-eingereicht-rgb), 0.3);
}

body[data-page="eigentuemer-abstimmungen"] .eig-detail-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================================
   ATTACHMENTS LIST (detail modal read-only)
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

body[data-page="eigentuemer-abstimmungen"] .eig-attachment-link {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.5em;
    border-radius: 0.375em;
    background: var(--glass-secondary);
    color: var(--stage-eingereicht);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    text-decoration: none;
    transition: background 0.2s;
}

body[data-page="eigentuemer-abstimmungen"] .eig-attachment-link:hover {
    background: var(--glass-hover);
}

body[data-page="eigentuemer-abstimmungen"] .eig-attachment-link [data-icon] {
    font-size: 1em;
}

/* ============================================================================
   HIDDEN UTILITY
   ============================================================================ */

body[data-page="eigentuemer-abstimmungen"] .eig-hidden {
    display: none;
}

/* ============================================================================
   RESPONSIVE -- MOBILE (<48em)
   ============================================================================ */

@media (max-width: 48em) {
    body[data-page="eigentuemer-abstimmungen"] .eig-mobile-tabs {
        display: flex;
    }

    body[data-page="eigentuemer-abstimmungen"] .eig-kanban {
        display: block;
    }

    body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col {
        display: none;
        min-height: 0;
    }

    body[data-page="eigentuemer-abstimmungen"] .eig-kanban-col.active {
        display: flex;
    }

    body[data-page="eigentuemer-abstimmungen"] .eig-abstimmungen-header {
        flex-wrap: wrap;
    }

    body[data-page="eigentuemer-abstimmungen"] .eig-abstimmungen-actions {
        width: 100%;
        justify-content: flex-end;
    }

    body[data-page="eigentuemer-abstimmungen"] .eig-detail-modal {
        max-width: none;
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    body[data-page="eigentuemer-abstimmungen"] .eig-detail-overlay {
        padding: 0;
    }

    body[data-page="eigentuemer-abstimmungen"] .eig-detail-info-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="eigentuemer-abstimmungen"] .eig-vote-option {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 75em) and (min-width: 48.0625em) {
    body[data-page="eigentuemer-abstimmungen"] .eig-kanban {
        grid-template-columns: repeat(2, 1fr);
    }
}

/**
 * @file eigentuemer-delegation.css
 * @filepath public/css/pages/eigentuemer-delegation.css
 * @description Styles for the Eigentuemer delegation management page.
 *   Includes tab navigation, delegation cards with status-based accent borders,
 *   verification code input, status badges, category checkboxes, consent forms,
 *   and create delegation form layout.
 *   Scoped to body[data-page="eigentuemer-delegation"].
 * @created 2026-02-15
 * @updated 2026-02-15
 *
 * <file_documentation>
 *   <purpose>
 *     Delegation management for co-owners (Stockwerkeigentuemer): grant/revoke
 *     voting delegations, 4-digit verification workflow, category exclusions,
 *     delegation history with status-colored cards, and consent forms.
 *   </purpose>
 *   <theme_support>All 5 themes via CSS variables</theme_support>
 *   <dependencies>core/variables-v2.css, core/themes-v2.css</dependencies>
 *   <classes>
 *     .delegation-tabs, .delegation-tab-btn, .delegation-tab-content,
 *     .delegation-card, .delegation-status-badge, .delegation-verify-input,
 *     .delegation-form
 *   </classes>
 * </file_documentation>
 */

/* ============================================================================
   PAGE LAYOUT
   ============================================================================ */

body[data-page="eigentuemer-delegation"] .delegation-page {
    min-height: 100vh;
    padding: 1.5em;
    max-width: 56.25em;
    margin: 0 auto;
}

body[data-page="eigentuemer-delegation"] .delegation-page-title {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5em;
}

/* ============================================================================
   TAB BAR
   ============================================================================ */

body[data-page="eigentuemer-delegation"] .delegation-tabs {
    display: flex;
    gap: 0.25em;
    margin-bottom: 1.5em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 0.1875em;
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
}

body[data-page="eigentuemer-delegation"] .delegation-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375em;
    padding: 0.625em 1em;
    border: none;
    border-radius: calc(var(--radius-lg) - 0.125em);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition-fast),
                background var(--transition-fast),
                box-shadow var(--transition-fast);
}

body[data-page="eigentuemer-delegation"] .delegation-tab-btn:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
}

body[data-page="eigentuemer-delegation"] .delegation-tab-btn.active {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    box-shadow: 0 0.125em 0.5em rgba(var(--ios-blue-rgb), 0.3);
}

body[data-page="eigentuemer-delegation"] .delegation-tab-btn [data-icon] {
    font-size: 1em;
}

body[data-page="eigentuemer-delegation"] .delegation-tab-btn .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25em;
    height: 1.25em;
    padding: 0 0.25em;
    border-radius: var(--radius-full);
    font-size: 0.75em;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.12);
    color: inherit;
}

/* ============================================================================
   TAB CONTENT PANELS
   ============================================================================ */

body[data-page="eigentuemer-delegation"] .delegation-tab-content {
    display: none;
}

body[data-page="eigentuemer-delegation"] .delegation-tab-content.active {
    display: block;
    animation: delegationFadeIn 0.25s ease-out;
}

@keyframes delegationFadeIn {
    from {
        opacity: 0;
        transform: translateY(0.5em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   DELEGATION CARDS
   Card list with left border accent based on delegation status
   ============================================================================ */

body[data-page="eigentuemer-delegation"] .delegation-list {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

body[data-page="eigentuemer-delegation"] .delegation-card {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1em 1.25em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast),
                border-color var(--transition-fast),
                transform var(--transition-fast);
}

body[data-page="eigentuemer-delegation"] .delegation-card:hover {
    background: var(--glass-hover);
    transform: translateY(-1px);
}

/* Status-based left border accent colors */
body[data-page="eigentuemer-delegation"] .delegation-card.status-pending {
    border-left-color: var(--ios-system-orange);
}

body[data-page="eigentuemer-delegation"] .delegation-card.status-active {
    border-left-color: var(--ios-system-green);
}

body[data-page="eigentuemer-delegation"] .delegation-card.status-expired {
    border-left-color: var(--text-tertiary);
}

body[data-page="eigentuemer-delegation"] .delegation-card.status-revoked {
    border-left-color: var(--ios-system-red);
}

body[data-page="eigentuemer-delegation"] .delegation-card-avatar {
    width: 2.75em;
    height: 2.75em;
    border-radius: 50%;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1em;
    color: var(--text-secondary);
}

body[data-page="eigentuemer-delegation"] .delegation-card-info {
    flex: 1;
    min-width: 0;
}

body[data-page="eigentuemer-delegation"] .delegation-card-name {
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="eigentuemer-delegation"] .delegation-card-dates {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-tertiary);
    margin-top: 0.125em;
}

body[data-page="eigentuemer-delegation"] .delegation-card-categories {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-quaternary);
    margin-top: 0.25em;
}

body[data-page="eigentuemer-delegation"] .delegation-card-actions {
    display: flex;
    gap: 0.375em;
    flex-shrink: 0;
}

body[data-page="eigentuemer-delegation"] .delegation-action-btn {
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

body[data-page="eigentuemer-delegation"] .delegation-action-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="eigentuemer-delegation"] .delegation-action-btn.revoke:hover {
    color: var(--ios-system-red);
    border-color: rgba(var(--ios-red-rgb), 0.3);
}

/* ============================================================================
   STATUS BADGES
   ============================================================================ */

body[data-page="eigentuemer-delegation"] .delegation-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1875em 0.625em;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

body[data-page="eigentuemer-delegation"] .delegation-status-badge.pending {
    background: rgba(var(--ios-orange-rgb), 0.15);
    color: var(--ios-system-orange);
}

body[data-page="eigentuemer-delegation"] .delegation-status-badge.active {
    background: rgba(var(--ios-green-rgb), 0.15);
    color: var(--ios-system-green);
}

body[data-page="eigentuemer-delegation"] .delegation-status-badge.expired {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
}

body[data-page="eigentuemer-delegation"] .delegation-status-badge.revoked {
    background: rgba(var(--ios-red-rgb), 0.15);
    color: var(--ios-system-red);
}

/* ============================================================================
   VERIFICATION CODE INPUT
   Centered 4-digit code entry with large monospace-style font
   ============================================================================ */

body[data-page="eigentuemer-delegation"] .delegation-verify-section {
    text-align: center;
    padding: 2em 1em;
}

body[data-page="eigentuemer-delegation"] .delegation-verify-label {
    font-family: var(--font-sans);
    font-size: 0.875em;
    color: var(--text-secondary);
    margin-bottom: 1em;
    display: block;
}

body[data-page="eigentuemer-delegation"] .delegation-verify-input {
    width: 8em;
    padding: 0.75em;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--text-primary);
    background: var(--glass-secondary);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast);
}

body[data-page="eigentuemer-delegation"] .delegation-verify-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 0.25em rgba(var(--ios-blue-rgb), 0.15);
}

body[data-page="eigentuemer-delegation"] .delegation-verify-input::placeholder {
    color: var(--text-quaternary);
    letter-spacing: 0.2em;
}

body[data-page="eigentuemer-delegation"] .delegation-verify-hint {
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-tertiary);
    margin-top: 0.75em;
}

body[data-page="eigentuemer-delegation"] .delegation-verify-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375em;
    padding: 0.625em 2em;
    margin-top: 1.25em;
    border: none;
    border-radius: var(--radius-md);
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 600;
    cursor: pointer;
    transition: filter var(--transition-fast), transform 0.1s;
}

body[data-page="eigentuemer-delegation"] .delegation-verify-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

body[data-page="eigentuemer-delegation"] .delegation-verify-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================================
   DELEGATION FORM
   Create new delegation form layout
   ============================================================================ */

body[data-page="eigentuemer-delegation"] .delegation-form {
    display: flex;
    flex-direction: column;
    gap: 1.25em;
}

body[data-page="eigentuemer-delegation"] .delegation-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}

body[data-page="eigentuemer-delegation"] .delegation-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

body[data-page="eigentuemer-delegation"] .delegation-form-label {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-secondary);
}

body[data-page="eigentuemer-delegation"] .delegation-form-input,
body[data-page="eigentuemer-delegation"] .delegation-form-select {
    padding: 0.625em 0.875em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9375em;
    transition: border-color var(--transition-fast);
}

body[data-page="eigentuemer-delegation"] .delegation-form-input:focus,
body[data-page="eigentuemer-delegation"] .delegation-form-select:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

body[data-page="eigentuemer-delegation"] .delegation-form-input::placeholder {
    color: var(--text-tertiary);
}

body[data-page="eigentuemer-delegation"] .delegation-form-hint {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
}

/* Category checkbox grid for excluded categories */
body[data-page="eigentuemer-delegation"] .delegation-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12em, 1fr));
    gap: 0.5em;
}

body[data-page="eigentuemer-delegation"] .delegation-category-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

body[data-page="eigentuemer-delegation"] .delegation-category-item:hover {
    background: var(--glass-hover);
}

body[data-page="eigentuemer-delegation"] .delegation-category-item.checked {
    border-color: var(--ios-system-orange);
    background: rgba(var(--ios-blue-rgb), 0.08);
}

body[data-page="eigentuemer-delegation"] .delegation-category-item input[type="checkbox"] {
    width: 1.125em;
    height: 1.125em;
    accent-color: var(--ios-system-orange);
    flex-shrink: 0;
}

body[data-page="eigentuemer-delegation"] .delegation-category-item span {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-primary);
}

/* Consent section */
body[data-page="eigentuemer-delegation"] .delegation-consent {
    padding: 1em 1.25em;
    background: rgba(var(--ios-blue-rgb), 0.06);
    border: 1px solid rgba(var(--ios-blue-rgb), 0.2);
    border-radius: var(--radius-lg);
}

body[data-page="eigentuemer-delegation"] .delegation-consent label {
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
    cursor: pointer;
}

body[data-page="eigentuemer-delegation"] .delegation-consent input[type="checkbox"] {
    width: 1.25em;
    height: 1.25em;
    accent-color: var(--ios-system-orange);
    flex-shrink: 0;
    margin-top: 0.125em;
}

body[data-page="eigentuemer-delegation"] .delegation-consent-text {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Submit button */
body[data-page="eigentuemer-delegation"] .delegation-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375em;
    padding: 0.75em 2em;
    border: none;
    border-radius: var(--radius-md);
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 600;
    cursor: pointer;
    transition: filter var(--transition-fast), transform 0.1s;
    align-self: flex-start;
}

body[data-page="eigentuemer-delegation"] .delegation-submit-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

body[data-page="eigentuemer-delegation"] .delegation-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

body[data-page="eigentuemer-delegation"] .delegation-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3em 1em;
    text-align: center;
    color: var(--text-tertiary);
    gap: 0.75em;
}

body[data-page="eigentuemer-delegation"] .delegation-empty [data-icon] {
    font-size: 2em;
    opacity: 0.5;
}

body[data-page="eigentuemer-delegation"] .delegation-empty-text {
    font-family: var(--font-sans);
    font-size: 0.875em;
}

/* ============================================================================
   RESPONSIVE -- MOBILE (<48em)
   Stack form fields vertically, scrollable tabs
   ============================================================================ */

@media (max-width: 48em) {
    body[data-page="eigentuemer-delegation"] .delegation-page {
        padding: 1em 0.75em;
    }

    body[data-page="eigentuemer-delegation"] .delegation-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    body[data-page="eigentuemer-delegation"] .delegation-tabs::-webkit-scrollbar {
        display: none;
    }

    body[data-page="eigentuemer-delegation"] .delegation-tab-btn {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    body[data-page="eigentuemer-delegation"] .delegation-form-row {
        grid-template-columns: 1fr;
    }

    body[data-page="eigentuemer-delegation"] .delegation-card {
        flex-wrap: wrap;
    }

    body[data-page="eigentuemer-delegation"] .delegation-card-actions {
        width: 100%;
        justify-content: flex-end;
    }

    body[data-page="eigentuemer-delegation"] .delegation-category-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="eigentuemer-delegation"] .delegation-verify-input {
        width: 100%;
        max-width: 10em;
    }

    body[data-page="eigentuemer-delegation"] .delegation-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/**
 * @file eigentuemer-nebenkosten.css
 * @filepath public/css/pages/eigentuemer-nebenkosten.css
 * @description Styles for the Eigentuemer Nebenkostenabrechnung (ancillary costs) page.
 *   Includes filter bar with period/building selectors, summary cards grid,
 *   cost breakdown table with glass header, reserve fund progress section,
 *   and PDF download button.
 *   Scoped to body[data-page="eigentuemer-nebenkosten"].
 * @created 2026-02-15
 * @updated 2026-02-15
 *
 * <file_documentation>
 *   <purpose>
 *     Ancillary cost statements for property co-owners (Stockwerkeigentuemer):
 *     period-based filtering, cost summary cards (total, reserve, per-object),
 *     detailed cost breakdown table, reserve fund tracking with progress bar
 *     toward target, and PDF export.
 *   </purpose>
 *   <theme_support>All 5 themes via CSS variables</theme_support>
 *   <dependencies>core/variables-v2.css, core/themes-v2.css</dependencies>
 *   <classes>
 *     .nebenkosten-filter-bar, .nebenkosten-summary-cards,
 *     .nebenkosten-table, .nebenkosten-reserve-section,
 *     .nebenkosten-download-btn
 *   </classes>
 * </file_documentation>
 */

/* ============================================================================
   PAGE LAYOUT
   ============================================================================ */

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-page {
    min-height: 100vh;
    padding: 1.5em;
    max-width: 80em;
    margin: 0 auto;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-page-title {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5em;
}

/* ============================================================================
   FILTER BAR
   Horizontal row with period selector, building filter, optional search
   ============================================================================ */

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75em;
    flex-wrap: wrap;
    margin-bottom: 1.5em;
    padding: 0.75em 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-group {
    display: flex;
    align-items: center;
    gap: 0.375em;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-label {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-select,
body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-input {
    padding: 0.5em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-select:focus,
body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-spacer {
    flex: 1;
}

/* ============================================================================
   SUMMARY CARDS
   Grid of 3-4 overview cards (total costs, reserve fund, per-object, etc.)
   ============================================================================ */

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em;
    margin-bottom: 1.5em;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
    padding: 1.25em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-card:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border-hover, var(--glass-border));
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-icon {
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    margin-bottom: 0.25em;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-icon svg,
body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-icon [data-icon] {
    width: 1.125em;
    height: 1.125em;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-label {
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-value {
    font-family: var(--font-sans);
    font-size: 1.75em;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-value.positive {
    color: var(--ios-system-green);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-value.negative {
    color: var(--ios-system-red);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-sublabel {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-quaternary);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 500;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-trend.positive {
    color: var(--ios-system-green);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-trend.negative {
    color: var(--ios-system-red);
}

/* ============================================================================
   COST BREAKDOWN TABLE
   Glass header row, scrollable body, total footer
   ============================================================================ */

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table-wrapper {
    margin-bottom: 1.5em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table-title {
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 0.875em;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table th {
    padding: 0.75em 1.25em;
    background: var(--glass-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table th.text-right,
body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table td.text-right {
    text-align: right;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table td {
    padding: 0.75em 1.25em;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table tbody tr {
    transition: background var(--transition-fast);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table tbody tr:hover {
    background: var(--glass-hover);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table tbody tr:last-child td {
    border-bottom: none;
}

/* Total row in table footer */
body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table tfoot td {
    padding: 0.75em 1.25em;
    background: var(--glass-secondary);
    color: var(--text-primary);
    font-weight: 700;
    border-top: 2px solid var(--glass-border);
    font-variant-numeric: tabular-nums;
}

/* Inline total row */
body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table tr.total-row td {
    font-weight: 700;
    border-top: 2px solid var(--glass-border);
    border-bottom: none;
    color: var(--text-primary);
}

/* Amount cells -- tabular nums for alignment */
body[data-page="eigentuemer-nebenkosten"] .nebenkosten-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    white-space: nowrap;
}

/* Category chip inside table rows */
body[data-page="eigentuemer-nebenkosten"] .nebenkosten-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.125em 0.5em;
    border-radius: var(--radius-full);
    font-size: 0.75em;
    font-weight: 500;
    background: var(--glass-secondary);
    color: var(--text-secondary);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-category-dot {
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================================================
   RESERVE FUND SECTION
   Detail section with progress bar toward reserve target
   ============================================================================ */

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-section {
    padding: 1.25em 1.5em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    margin-bottom: 1.5em;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1em;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-title {
    font-family: var(--font-sans);
    font-size: 0.9375em;
    font-weight: 600;
    color: var(--text-primary);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-amount {
    font-family: var(--font-sans);
    font-size: 1.25em;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* Progress bar container */
body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-progress {
    height: 0.625em;
    background: var(--glass-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5em;
}

/* Progress bar fill -- color indicates health */
body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--ios-system-orange), var(--ios-system-green));
    transition: width 0.5s ease;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-progress-fill.warning {
    background: linear-gradient(90deg, var(--ios-system-orange), var(--ios-system-yellow));
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-progress-fill.danger {
    background: var(--ios-system-red);
}

/* Progress labels row */
body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-target {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Reserve fund detail grid */
body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75em;
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-detail {
    display: flex;
    flex-direction: column;
    gap: 0.125em;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-detail-label {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-detail-value {
    font-family: var(--font-sans);
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ============================================================================
   PDF DOWNLOAD BUTTON
   ============================================================================ */

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.625em 1.25em;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-download-btn:hover {
    background: var(--glass-hover);
    border-color: var(--ios-system-orange);
    color: var(--ios-system-orange);
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-download-btn [data-icon] {
    font-size: 1em;
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4em 2em;
    text-align: center;
    color: var(--text-tertiary);
    gap: 0.75em;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-empty [data-icon] {
    font-size: 2.5em;
    opacity: 0.5;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-empty-text {
    font-family: var(--font-sans);
    font-size: 0.875em;
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4em 2em;
    gap: 0.75em;
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-loading-spinner {
    width: 1.5em;
    height: 1.5em;
    border: 2px solid var(--glass-border);
    border-top-color: var(--ios-system-orange);
    border-radius: 50%;
    animation: nebenkostenSpin 0.8s linear infinite;
}

@keyframes nebenkostenSpin {
    to { transform: rotate(360deg); }
}

body[data-page="eigentuemer-nebenkosten"] .nebenkosten-loading-text {
    font-family: var(--font-sans);
    font-size: 0.875em;
    color: var(--text-tertiary);
}

/* ============================================================================
   RESPONSIVE -- MOBILE (<48em)
   Summary cards stack to 1 column, table becomes horizontally scrollable
   ============================================================================ */

@media (max-width: 48em) {
    body[data-page="eigentuemer-nebenkosten"] .nebenkosten-page {
        padding: 1em 0.75em;
    }

    body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-group {
        flex-wrap: wrap;
    }

    body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-spacer {
        display: none;
    }

    body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-select,
    body[data-page="eigentuemer-nebenkosten"] .nebenkosten-filter-input {
        width: 100%;
    }

    body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-cards {
        grid-template-columns: 1fr;
    }

    body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table-scroll {
        overflow-x: auto;
        scrollbar-width: thin;
    }

    /* Ensure table has a minimum width for scrollability */
    body[data-page="eigentuemer-nebenkosten"] .nebenkosten-table {
        min-width: 40em;
    }

    body[data-page="eigentuemer-nebenkosten"] .nebenkosten-reserve-details {
        grid-template-columns: 1fr;
    }

    body[data-page="eigentuemer-nebenkosten"] .nebenkosten-download-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Tablet breakpoint -- 2 columns for summary cards */
@media (max-width: 62em) and (min-width: 48.0625em) {
    body[data-page="eigentuemer-nebenkosten"] .nebenkosten-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/**
 * @file property-associations.css
 * @filepath public/css/pages/property-associations.css
 * @description Styles for the property association (Stockwerkeigentum) panel
 *   within the liegenschaften/building detail view. Extends existing
 *   liegenschaften page. Includes Wertquoten table, owner management,
 *   setup modal, and jurisdiction badges.
 *   Scoped to body[data-page="liegenschaften"].
 * @created 2026-02-15
 *
 * <file_documentation>
 *   <purpose>
 *     Association management panel within building detail: Wertquoten (value quotas)
 *     table with editable cells, owner list with action buttons, setup modal,
 *     and jurisdiction display.
 *   </purpose>
 *   <theme_support>All 5 themes via CSS variables</theme_support>
 *   <dependencies>core/variables-v2.css, core/themes-v2.css, pages/liegenschaften.css</dependencies>
 * </file_documentation>
 */

/* ============================================================================
   ASSOCIATION PANEL (section within building detail)
   ============================================================================ */

body[data-page="liegenschaften"] .assoc-panel {
    padding: 1.25em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25em;
}

body[data-page="liegenschaften"] .assoc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1em;
}

body[data-page="liegenschaften"] .assoc-panel-title {
    font-family: var(--font-serif);
    font-size: 1.0625em;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="liegenschaften"] .assoc-panel-actions {
    display: flex;
    gap: 0.5em;
}

body[data-page="liegenschaften"] .assoc-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.375em 0.75em;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-primary);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

body[data-page="liegenschaften"] .assoc-action-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
    border-color: var(--glass-border-hover);
}

body[data-page="liegenschaften"] .assoc-action-btn [data-icon] {
    font-size: 0.875em;
}

/* ============================================================================
   WERTQUOTEN TABLE (editable cells)
   ============================================================================ */

body[data-page="liegenschaften"] .assoc-wertquoten-wrapper {
    overflow-x: auto;
    margin-bottom: 1em;
}

body[data-page="liegenschaften"] .assoc-wertquoten-table {
    width: 100%;
    border-collapse: collapse;
}

body[data-page="liegenschaften"] .assoc-wertquoten-table th {
    text-align: left;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.625em 0.75em;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-secondary);
}

body[data-page="liegenschaften"] .assoc-wertquoten-table th:last-child {
    text-align: right;
}

body[data-page="liegenschaften"] .assoc-wertquoten-table td {
    padding: 0.625em 0.75em;
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="liegenschaften"] .assoc-wertquoten-table td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Editable cells */
body[data-page="liegenschaften"] .assoc-wertquoten-input {
    width: 5em;
    padding: 0.3125em 0.5em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-variant-numeric: tabular-nums;
    text-align: right;
    transition: border-color 0.2s;
}

body[data-page="liegenschaften"] .assoc-wertquoten-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

/* Validation highlight: red border if sum != total */
body[data-page="liegenschaften"] .assoc-wertquoten-input.invalid {
    border-color: var(--ios-system-red);
    background: rgba(255, 59, 48, 0.06);
}

/* Total row */
body[data-page="liegenschaften"] .assoc-wertquoten-table tr.total-row td {
    font-weight: 700;
    border-top: 2px solid var(--glass-border);
    border-bottom: none;
}

body[data-page="liegenschaften"] .assoc-wertquoten-total {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

body[data-page="liegenschaften"] .assoc-wertquoten-total.valid {
    color: var(--ios-system-green);
}

body[data-page="liegenschaften"] .assoc-wertquoten-total.invalid {
    color: var(--ios-system-red);
}

/* Validation message */
body[data-page="liegenschaften"] .assoc-validation-msg {
    font-family: var(--font-sans);
    font-size: 0.75em;
    margin-top: 0.5em;
    display: flex;
    align-items: center;
    gap: 0.25em;
}

body[data-page="liegenschaften"] .assoc-validation-msg.error {
    color: var(--ios-system-red);
}

body[data-page="liegenschaften"] .assoc-validation-msg.success {
    color: var(--ios-system-green);
}

/* ============================================================================
   OWNER TABLE
   ============================================================================ */

body[data-page="liegenschaften"] .assoc-owners-table {
    width: 100%;
    border-collapse: collapse;
}

body[data-page="liegenschaften"] .assoc-owners-table th {
    text-align: left;
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.625em 0.75em;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-secondary);
}

body[data-page="liegenschaften"] .assoc-owners-table td {
    padding: 0.625em 0.75em;
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
}

/* Owner name with avatar */
body[data-page="liegenschaften"] .assoc-owner-cell {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

body[data-page="liegenschaften"] .assoc-owner-avatar {
    width: 1.75em;
    height: 1.75em;
    border-radius: 50%;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-sans);
    font-size: 0.625em;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Action buttons in table */
body[data-page="liegenschaften"] .assoc-owner-actions {
    display: flex;
    gap: 0.25em;
    justify-content: flex-end;
}

body[data-page="liegenschaften"] .assoc-owner-btn {
    width: 1.75em;
    height: 1.75em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s;
}

body[data-page="liegenschaften"] .assoc-owner-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .assoc-owner-btn.invite {
    color: var(--ios-system-orange);
}

body[data-page="liegenschaften"] .assoc-owner-btn.invite:hover {
    border-color: rgba(255, 149, 0, 0.3);
}

body[data-page="liegenschaften"] .assoc-owner-btn.remove:hover {
    color: var(--ios-system-red);
    border-color: rgba(255, 59, 48, 0.3);
}

body[data-page="liegenschaften"] .assoc-owner-btn [data-icon] {
    font-size: 0.8125em;
}

/* ============================================================================
   OWNER ASSIGNMENT DROPDOWN (in objects table)
   ============================================================================ */

body[data-page="liegenschaften"] .assoc-owner-dropdown-wrap {
    position: relative;
}

/* Trigger button (the clickable cell content) */
body[data-page="liegenschaften"] .assoc-owner-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.25em 0.5em;
    border: 1px solid transparent;
    border-radius: 0.375em;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

body[data-page="liegenschaften"] .assoc-owner-trigger:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .assoc-owner-trigger--active {
    background: var(--glass-secondary);
    border-color: var(--ios-system-orange);
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .assoc-owner-trigger--assigned {
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .assoc-owner-trigger--unassigned {
    color: var(--text-quaternary);
}

body[data-page="liegenschaften"] .assoc-owner-trigger--unassigned:hover {
    color: var(--ios-system-orange);
}

/* Small avatar in trigger */
body[data-page="liegenschaften"] .assoc-owner-trigger-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.375em;
    height: 1.375em;
    border-radius: 50%;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    font-size: 0.6875em;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* Dropdown panel */
body[data-page="liegenschaften"] .assoc-owner-dropdown {
    position: absolute;
    top: calc(100% + 0.25em);
    left: 0;
    z-index: 50;
    min-width: 14em;
    max-height: 16em;
    overflow-y: auto;
    background: var(--glass-thick, rgba(30, 30, 30, 0.92));
    backdrop-filter: blur(1.5em);
    -webkit-backdrop-filter: blur(1.5em);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    box-shadow: 0 0.5em 2em rgba(0, 0, 0, 0.25);
    padding: 0.25em;
    animation: assocDropdownIn 0.15s ease-out;
}

@keyframes assocDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-0.25em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Individual option */
body[data-page="liegenschaften"] .assoc-owner-option {
    display: flex;
    align-items: center;
    gap: 0.5em;
    width: 100%;
    padding: 0.4375em 0.5em;
    border: none;
    border-radius: 0.3125em;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8125em;
    cursor: pointer;
    transition: background 0.1s ease;
    text-align: left;
}

body[data-page="liegenschaften"] .assoc-owner-option:hover {
    background: var(--glass-hover);
}

body[data-page="liegenschaften"] .assoc-owner-option--current {
    background: var(--glass-secondary);
}

body[data-page="liegenschaften"] .assoc-owner-option--remove {
    color: var(--ios-system-red);
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0.3125em 0.3125em 0 0;
    margin-bottom: 0.125em;
    padding-bottom: 0.5em;
}

body[data-page="liegenschaften"] .assoc-owner-option--remove:hover {
    background: rgba(255, 59, 48, 0.1);
}

body[data-page="liegenschaften"] .assoc-owner-option--remove [data-icon] {
    font-size: 0.75em;
}

body[data-page="liegenschaften"] .assoc-owner-option--empty {
    color: var(--text-tertiary);
    font-style: italic;
    cursor: default;
}

body[data-page="liegenschaften"] .assoc-owner-option--empty:hover {
    background: transparent;
}

/* Avatar in dropdown option */
body[data-page="liegenschaften"] .assoc-owner-option-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    background: var(--glass-secondary);
    color: var(--text-primary);
    font-size: 0.6875em;
    font-weight: 600;
    flex-shrink: 0;
}

body[data-page="liegenschaften"] .assoc-owner-option-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-page="liegenschaften"] .assoc-owner-option-check {
    color: var(--ios-system-orange);
    font-size: 0.75em;
    flex-shrink: 0;
}

/* ============================================================================
   SETUP MODAL
   ============================================================================ */

body[data-page="liegenschaften"] .assoc-setup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(0.5em);
    -webkit-backdrop-filter: blur(0.5em);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5em;
}

body[data-page="liegenschaften"] .assoc-setup-overlay.open {
    display: flex;
}

body[data-page="liegenschaften"] .assoc-setup-modal {
    width: 100%;
    max-width: 36em;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--glass-thick, var(--glass-primary));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl, 0 1.5em 3em rgba(0, 0, 0, 0.2));
    animation: assocModalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes assocModalEnter {
    from {
        opacity: 0;
        transform: translateY(2em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body[data-page="liegenschaften"] .assoc-setup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25em 1.5em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="liegenschaften"] .assoc-setup-title {
    font-family: var(--font-serif);
    font-size: 1.0625em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

body[data-page="liegenschaften"] .assoc-setup-close {
    width: 2em;
    height: 2em;
    border-radius: 0.5em;
    border: 1px solid var(--glass-border);
    background: var(--glass-primary);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

body[data-page="liegenschaften"] .assoc-setup-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .assoc-setup-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.25em 1.5em;
}

body[data-page="liegenschaften"] .assoc-setup-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="liegenschaften"] .assoc-setup-group {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

body[data-page="liegenschaften"] .assoc-setup-label {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-secondary);
}

body[data-page="liegenschaften"] .assoc-setup-input {
    padding: 0.5em 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875em;
    transition: border-color 0.2s;
}

body[data-page="liegenschaften"] .assoc-setup-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

/* Chrome autofill override for association modal inputs */
body[data-page="liegenschaften"] .assoc-setup-input:-webkit-autofill,
body[data-page="liegenschaften"] .assoc-setup-input:-webkit-autofill:hover,
body[data-page="liegenschaften"] .assoc-setup-input:-webkit-autofill:focus,
body[data-page="liegenschaften"] .assoc-setup-input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-primary) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--input-bg-solid, var(--glass-primary)) inset !important;
    box-shadow: 0 0 0 1000px var(--input-bg-solid, var(--glass-primary)) inset !important;
    background-color: var(--input-bg-solid, var(--glass-primary)) !important;

    caret-color: var(--text-primary) !important;
}

body[data-page="liegenschaften"] .assoc-setup-footer {
    display: flex;
    gap: 0.625em;
    padding: 1em 1.5em;
    border-top: 1px solid var(--glass-border);
    justify-content: flex-end;
}

body[data-page="liegenschaften"] .assoc-setup-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.5em 1.25em;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

body[data-page="liegenschaften"] .assoc-setup-btn-secondary {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

body[data-page="liegenschaften"] .assoc-setup-btn-secondary:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .assoc-setup-btn-primary {
    background: var(--ios-system-orange);
    border: 1px solid var(--ios-system-orange);
    color: var(--button-text-on-color);
}

body[data-page="liegenschaften"] .assoc-setup-btn-primary:hover {
    filter: brightness(1.1);
}

/* ============================================================================
   JURISDICTION BADGE
   ============================================================================ */

body[data-page="liegenschaften"] .assoc-jurisdiction-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.125em 0.5em;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: 0.625em;
    font-weight: 600;
    letter-spacing: 0.02em;
}

body[data-page="liegenschaften"] .assoc-jurisdiction-badge.ch {
    background: rgba(255, 59, 48, 0.12);
    color: var(--ios-system-red);
}

body[data-page="liegenschaften"] .assoc-jurisdiction-badge.de {
    background: var(--glass-secondary);
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .assoc-jurisdiction-badge.us-ca {
    background: rgba(255, 149, 0, 0.12);
    color: var(--ios-system-orange);
}

body[data-page="liegenschaften"] .assoc-jurisdiction-flag {
    font-size: 1em;
    line-height: 1;
}

/* ============================================================================
   OWNERSHIP BADGES (nav list)
   ============================================================================ */

body[data-page="liegenschaften"] .property-row-badges {
    display: flex;
    align-items: center;
    gap: 0.375em;
    flex-shrink: 0;
}

body[data-page="liegenschaften"] .ownership-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125em 0.4375em;
    border-radius: var(--radius-full, 9999px);
    font-family: var(--font-sans);
    font-size: 0.5625em;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

body[data-page="liegenschaften"] .ownership-badge--stockwerkeigentum {
    background: rgba(255, 59, 48, 0.12);
    color: var(--ios-system-red);
}

body[data-page="liegenschaften"] .ownership-badge--weg {
    background: rgba(255, 149, 0, 0.12);
    color: var(--ios-system-orange);
}

/* ============================================================================
   NAV SEGMENTED CONTROL (Gebäude / Gesellschaften)
   ============================================================================ */

body[data-page="liegenschaften"] .nav-segmented-control {
    display: flex;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.1875em;
    gap: 0.125em;
    margin-bottom: 0.75em;
}

body[data-page="liegenschaften"] .nav-segment-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3125em;
    padding: 0.375em 0.5em;
    border-radius: calc(var(--radius-md) - 0.125em);
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-family: var(--font-sans);
    font-size: 0.6875em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

body[data-page="liegenschaften"] .nav-segment-btn:hover {
    color: var(--text-secondary);
    background: var(--glass-hover);
}

body[data-page="liegenschaften"] .nav-segment-btn.active {
    background: var(--glass-secondary);
    color: var(--text-primary);
    box-shadow: 0 0.0625em 0.1875em rgba(0, 0, 0, 0.08);
}

body[data-page="liegenschaften"] .nav-segment-btn [data-icon] {
    font-size: 0.9375em;
}

/* Nav list containers — toggle visibility with segment */
body[data-page="liegenschaften"] .nav-list-container {
    display: none;
}

body[data-page="liegenschaften"] .nav-list-container.active {
    display: block;
}

/* ============================================================================
   GESELLSCHAFT LIST (in nav panel)
   ============================================================================ */

body[data-page="liegenschaften"] .gesellschaft-row {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.625em 0.75em;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.15s;
}

body[data-page="liegenschaften"] .gesellschaft-row:hover {
    background: var(--glass-hover);
}

body[data-page="liegenschaften"] .gesellschaft-row.active {
    background: var(--glass-secondary);
}

body[data-page="liegenschaften"] .gesellschaft-icon {
    width: 2.25em;
    height: 2.25em;
    border-radius: var(--radius-sm);
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-tertiary);
}

body[data-page="liegenschaften"] .gesellschaft-icon [data-icon] {
    font-size: 1em;
}

body[data-page="liegenschaften"] .gesellschaft-row-info {
    flex: 1;
    min-width: 0;
}

body[data-page="liegenschaften"] .gesellschaft-row-name {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-page="liegenschaften"] .gesellschaft-row-meta {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-page="liegenschaften"] .gesellschaft-type-badge {
    display: inline-flex;
    padding: 0.125em 0.375em;
    border-radius: var(--radius-full, 9999px);
    font-family: var(--font-sans);
    font-size: 0.5625em;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}

body[data-page="liegenschaften"] .gesellschaft-type-badge.stockwerkeigentum {
    background: rgba(255, 59, 48, 0.12);
    color: var(--ios-system-red);
}

body[data-page="liegenschaften"] .gesellschaft-type-badge.weg {
    background: rgba(255, 149, 0, 0.12);
    color: var(--ios-system-orange);
}

/* ============================================================================
   GESELLSCHAFT DETAIL CONTAINER (CSS show/hide — preserves building view DOM)
   ============================================================================ */

body[data-page="liegenschaften"] .gesellschaft-detail-container {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* ============================================================================
   GESELLSCHAFT DETAIL PANEL (content within the container)
   ============================================================================ */

body[data-page="liegenschaften"] .gesellschaft-detail-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25em;
    padding: 1.25em;
    overflow-y: auto;
}

body[data-page="liegenschaften"] .gesellschaft-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1em;
}

body[data-page="liegenschaften"] .gesellschaft-detail-title {
    font-family: var(--font-serif);
    font-size: 1.375em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

body[data-page="liegenschaften"] .gesellschaft-detail-subtitle {
    font-family: var(--font-sans);
    font-size: 0.8125em;
    color: var(--text-tertiary);
    margin: 0.25em 0 0;
}

/* Sections within detail */
body[data-page="liegenschaften"] .gesellschaft-section {
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25em;
}

body[data-page="liegenschaften"] .gesellschaft-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1em;
}

body[data-page="liegenschaften"] .gesellschaft-section-title {
    font-family: var(--font-serif);
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5em;
}

/* ============================================================================
   EIGENTÜMER CARDS (within Gesellschaft detail)
   ============================================================================ */

body[data-page="liegenschaften"] .eigentuemer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18em, 1fr));
    gap: 0.75em;
}

body[data-page="liegenschaften"] .eigentuemer-card {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1em;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    transition: border-color 0.2s;
}

body[data-page="liegenschaften"] .eigentuemer-card:hover {
    border-color: var(--glass-border-hover, var(--glass-border));
}

body[data-page="liegenschaften"] .eigentuemer-card-header {
    display: flex;
    align-items: center;
    gap: 0.625em;
}

body[data-page="liegenschaften"] .eigentuemer-avatar {
    width: 2.25em;
    height: 2.25em;
    border-radius: 50%;
    background: var(--glass-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 0.75em;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}

body[data-page="liegenschaften"] .eigentuemer-name {
    font-family: var(--font-sans);
    font-size: 0.875em;
    font-weight: 600;
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .eigentuemer-detail-row {
    display: flex;
    align-items: center;
    gap: 0.375em;
    font-family: var(--font-sans);
    font-size: 0.75em;
    color: var(--text-secondary);
}

body[data-page="liegenschaften"] .eigentuemer-detail-row [data-icon] {
    font-size: 0.875em;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

body[data-page="liegenschaften"] .eigentuemer-card-actions {
    display: flex;
    gap: 0.375em;
    margin-top: 0.375em;
    padding-top: 0.5em;
    border-top: 1px solid var(--glass-border);
}

/* ============================================================================
   ADD EIGENTÜMER FORM (modal within Gesellschaft)
   ============================================================================ */

body[data-page="liegenschaften"] .eigentuemer-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75em;
}

body[data-page="liegenschaften"] .eigentuemer-form-grid .form-group.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 36em) {
    body[data-page="liegenschaften"] .eigentuemer-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   BUILDING ASSIGNMENT (within Gesellschaft detail)
   ============================================================================ */

body[data-page="liegenschaften"] .building-assignment-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

body[data-page="liegenschaften"] .building-assignment-item {
    display: flex;
    align-items: center;
    gap: 0.625em;
    padding: 0.625em 0.75em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

body[data-page="liegenschaften"] .building-assignment-item [data-icon] {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

body[data-page="liegenschaften"] .building-assignment-name {
    flex: 1;
    font-family: var(--font-sans);
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-primary);
}

body[data-page="liegenschaften"] .building-assignment-units {
    font-family: var(--font-sans);
    font-size: 0.6875em;
    color: var(--text-tertiary);
}

body[data-page="liegenschaften"] .building-assignment-remove {
    width: 1.5em;
    height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-quaternary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

body[data-page="liegenschaften"] .building-assignment-remove:hover {
    background: rgba(255, 59, 48, 0.08);
    color: var(--ios-system-red);
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

body[data-page="liegenschaften"] .assoc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2em 1em;
    text-align: center;
    color: var(--text-tertiary);
    gap: 0.625em;
}

body[data-page="liegenschaften"] .assoc-empty [data-icon] {
    font-size: 2em;
    opacity: 0.5;
}

body[data-page="liegenschaften"] .assoc-empty-text {
    font-family: var(--font-sans);
    font-size: 0.8125em;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 48em) {
    body[data-page="liegenschaften"] .assoc-panel {
        padding: 1em;
    }

    body[data-page="liegenschaften"] .assoc-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75em;
    }

    body[data-page="liegenschaften"] .assoc-panel-actions {
        width: 100%;
    }

    body[data-page="liegenschaften"] .assoc-wertquoten-wrapper {
        overflow-x: auto;
    }

    body[data-page="liegenschaften"] .assoc-wertquoten-table {
        min-width: 28em;
    }

    body[data-page="liegenschaften"] .assoc-owners-table {
        min-width: 28em;
    }

    body[data-page="liegenschaften"] .assoc-setup-modal {
        max-width: none;
        max-height: 100vh;
        border-radius: 0;
    }

    body[data-page="liegenschaften"] .assoc-setup-overlay {
        padding: 0;
    }

    /* On mobile, dropdown may overflow right edge - anchor right instead */
    body[data-page="liegenschaften"] .assoc-owner-dropdown {
        left: auto;
        right: 0;
    }
}

/* COEUS — vendor-team-welcome.css — Extracted from vendor-team-welcome.html */

/**
 * @file vendor-team-welcome.css
 * @filepath public/css/pages/vendor-team-welcome.css
 * @description Styles for the vendor team member onboarding page.
 *   - Language checkbox grid with selection state
 *   - Skill tag input with removable tags
 * @created 2026-03-03
 *
 * Theme-aware using CSS variables from themes-v2.css
 */

/* =============================================================
   LANGUAGE CHECKBOX GRID
   ============================================================= */

body[data-page="vendor-team-welcome"] .language-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}

body[data-page="vendor-team-welcome"] .language-checkbox {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.375em 0.75em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-page="vendor-team-welcome"] .language-checkbox:hover {
    background: var(--glass-hover);
}

body[data-page="vendor-team-welcome"] .language-checkbox input[type="checkbox"] {
    width: 0.875em;
    height: 0.875em;
    accent-color: var(--ios-system-orange);
}

body[data-page="vendor-team-welcome"] .language-checkbox.selected {
    background: var(--glass-secondary);
    border-color: var(--ios-system-orange);
}

body[data-page="vendor-team-welcome"] .language-checkbox label {
    cursor: pointer;
    font-size: 0.8125em;
    color: var(--text-primary);
}

/* =============================================================
   SKILL INPUT
   ============================================================= */

body[data-page="vendor-team-welcome"] .skill-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    padding: 0.5em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    min-height: 2.5em;
}

body[data-page="vendor-team-welcome"] .skill-tag {
    display: flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.25em 0.5em;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.8125em;
    color: var(--text-primary);
}

body[data-page="vendor-team-welcome"] .skill-tag button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-tertiary);
    font-size: 1em;
    line-height: 1;
}

body[data-page="vendor-team-welcome"] .skill-tag button:hover {
    color: var(--ios-system-red);
}

body[data-page="vendor-team-welcome"] .skill-input {
    flex: 1;
    min-width: 6.25em;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875em;
    color: var(--text-primary);
}

body[data-page="vendor-team-welcome"] .skill-input::placeholder {
    color: var(--text-tertiary);
}

/* COEUS — renter-contract.css — Extracted from renter-contract.html */

/**
 * @file renter-contract.css
 * @filepath public/css/pages/renter-contract.css
 * @description Styles for the renter contract detail page.
 *   - Page header with back button
 *   - Contract details grid (responsive auto-fit)
 *   - Contract terms list
 *   - Document list
 *   - Landlord info card with avatar
 * @created 2026-03-03
 *
 * Theme-aware using CSS variables from themes-v2.css
 */

/* =============================================================
   PAGE HEADER
   ============================================================= */

body[data-page="renter-contract"] .renter-page-header {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 1.5em;
}

body[data-page="renter-contract"] .header-title {
    flex: 1;
}

body[data-page="renter-contract"] .back-button {
    flex-shrink: 0;
}

/* =============================================================
   CONTRACT DETAILS GRID
   ============================================================= */

body[data-page="renter-contract"] .contract-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.375em, 1fr));
    gap: 1em;
}

body[data-page="renter-contract"] .contract-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

/* =============================================================
   CONTRACT TERMS LIST
   ============================================================= */

body[data-page="renter-contract"] .contract-terms-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="renter-contract"] .contract-term-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
}

body[data-page="renter-contract"] .contract-term-item > div {
    display: flex;
    flex-direction: column;
}

/* =============================================================
   CONTRACT DOCUMENTS LIST
   ============================================================= */

body[data-page="renter-contract"] .contract-documents-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

/* =============================================================
   LANDLORD INFO
   ============================================================= */

body[data-page="renter-contract"] .landlord-info {
    display: flex;
    align-items: center;
    gap: 1em;
}

body[data-page="renter-contract"] .landlord-avatar {
    width: 3em;
    height: 3em;
    border-radius: 50%;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

body[data-page="renter-contract"] .landlord-avatar i {
    font-size: 1.5em;
}

body[data-page="renter-contract"] .landlord-details {
    flex: 1;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 37.5em) {
    body[data-page="renter-contract"] .landlord-info {
        flex-direction: column;
        align-items: flex-start;
    }

    body[data-page="renter-contract"] .landlord-info .glass-button {
        width: 100%;
        justify-content: center;
    }
}

/* COEUS — renter-handover.css — Extracted from renter-handover.html */

body[data-page="renter-handover"] .renter-page-header {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 1.5em;
}

body[data-page="renter-handover"] .header-title {
    flex: 1;
}

body[data-page="renter-handover"] .back-button {
    flex-shrink: 0;
}

body[data-page="renter-handover"] .protocols-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="renter-handover"] .protocols-empty {
    text-align: center;
    padding: 2em;
}

body[data-page="renter-handover"] .protocol-card {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1em;
    background: var(--glass-secondary);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

body[data-page="renter-handover"] .protocol-card:hover {
    background: var(--glass-hover);
}

body[data-page="renter-handover"] .protocol-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body[data-page="renter-handover"] .type-move-in {
    background: rgba(52, 199, 89, 0.2);
    color: var(--ios-system-green);
}

body[data-page="renter-handover"] .type-move-out {
    background: rgba(255, 149, 0, 0.2);
    color: var(--ios-system-orange);
}

body[data-page="renter-handover"] .protocol-content {
    flex: 1;
}

body[data-page="renter-handover"] .protocol-date,
body[data-page="renter-handover"] .protocol-keys {
    display: flex;
    align-items: center;
    gap: 0.25em;
    margin-top: 0.25em;
}

body[data-page="renter-handover"] .protocol-date i,
body[data-page="renter-handover"] .protocol-keys i {
    font-size: 0.875em;
}

body[data-page="renter-handover"] .protocol-arrow {
    color: var(--text-tertiary);
}

body[data-page="renter-handover"] .info-content {
    display: flex;
    flex-direction: column;
}

body[data-page="renter-handover"] .info-items {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="renter-handover"] .info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
}

body[data-page="renter-handover"] .info-item > div {
    display: flex;
    flex-direction: column;
}

/* Modal Styles */
body[data-page="renter-handover"] .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1em;
}

body[data-page="renter-handover"] .protocol-modal {
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

body[data-page="renter-handover"] .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5em;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="renter-handover"] .modal-body {
    padding: 1.5em;
    overflow-y: auto;
    flex: 1;
}

body[data-page="renter-handover"] .modal-footer {
    padding: 1em 1.5em;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
}

body[data-page="renter-handover"] .detail-section {
    margin-bottom: 1.5em;
}

body[data-page="renter-handover"] .meters-list {
    margin-top: 0.5em;
}

body[data-page="renter-handover"] .meter-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5em 0;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="renter-handover"] .meter-row:last-child {
    border-bottom: none;
}

/* COEUS — renter-messages.css — Extracted from renter-messages.html */

body[data-page="renter-messages"] .messages-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: calc(100vh - 2em);
}

body[data-page="renter-messages"] .renter-page-header {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 1em;
    flex-shrink: 0;
}

body[data-page="renter-messages"] .header-title {
    flex: 1;
}

body[data-page="renter-messages"] .back-button {
    flex-shrink: 0;
}

body[data-page="renter-messages"] .messages-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

body[data-page="renter-messages"] .messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 1em;
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

body[data-page="renter-messages"] .messages-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2em;
}

body[data-page="renter-messages"] .message-item {
    display: flex;
    max-width: 80%;
}

body[data-page="renter-messages"] .message-own {
    align-self: flex-end;
}

body[data-page="renter-messages"] .message-other {
    align-self: flex-start;
}

body[data-page="renter-messages"] .message-bubble {
    padding: 0.75em 1em;
    border-radius: 16px;
    max-width: 100%;
}

body[data-page="renter-messages"] .message-own .message-bubble {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border-bottom-right-radius: 4px;
}

body[data-page="renter-messages"] .message-other .message-bubble {
    background: var(--glass-secondary);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

body[data-page="renter-messages"] .message-content {
    margin: 0;
    word-wrap: break-word;
    white-space: pre-wrap;
}

body[data-page="renter-messages"] .message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25em;
    margin-top: 0.25em;
}

body[data-page="renter-messages"] .message-time {
    font-size: 0.7em;
    opacity: 0.7;
}

body[data-page="renter-messages"] .message-own .message-time {
    color: var(--text-secondary);
}

body[data-page="renter-messages"] .message-read-icon {
    font-size: 0.75em;
    color: var(--text-secondary);
}

body[data-page="renter-messages"] .message-input-container {
    display: flex;
    align-items: flex-end;
    gap: 0.5em;
    padding: 1em;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-primary);
}

body[data-page="renter-messages"] .message-input {
    flex: 1;
    background: var(--glass-secondary);
    border: none;
    border-radius: 20px;
    padding: 0.75em 1em;
    color: var(--text-primary);
    font-size: 1em;
    resize: none;
    max-height: 120px;
    overflow-y: auto;
}

body[data-page="renter-messages"] .message-input::placeholder {
    color: var(--text-tertiary);
}

body[data-page="renter-messages"] .message-input:focus {
    outline: none;
    background: var(--glass-hover);
}

body[data-page="renter-messages"] .send-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

body[data-page="renter-messages"] .send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body[data-page="renter-messages"] .send-button:not(:disabled) {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

@media (max-width: 37.5em) {
    body[data-page="renter-messages"] .message-item {
        max-width: 90%;
    }
}

/* COEUS — renter-nebenkosten.css — Extracted from renter-nebenkosten.html */

body[data-page="renter-nebenkosten"] .renter-page-header {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 1.5em;
}

body[data-page="renter-nebenkosten"] .header-title {
    flex: 1;
}

body[data-page="renter-nebenkosten"] .back-button {
    flex-shrink: 0;
}

body[data-page="renter-nebenkosten"] .settlements-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="renter-nebenkosten"] .settlement-empty {
    text-align: center;
    padding: 2em;
}

body[data-page="renter-nebenkosten"] .settlement-card {
    background: var(--glass-secondary);
    border-radius: 12px;
    padding: 1em;
}

body[data-page="renter-nebenkosten"] .settlement-header {
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin-bottom: 1em;
}

body[data-page="renter-nebenkosten"] .settlement-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--glass-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

body[data-page="renter-nebenkosten"] .settlement-period {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

body[data-page="renter-nebenkosten"] .settlement-status {
    font-size: 0.75em;
    padding: 0.25em 0.5em;
    border-radius: 4px;
}

body[data-page="renter-nebenkosten"] .status-draft {
    background: var(--glass-secondary);
    color: var(--text-secondary);
}

body[data-page="renter-nebenkosten"] .status-sent {
    background: rgba(0, 122, 255, 0.2);
    color: var(--ios-system-orange);
}

body[data-page="renter-nebenkosten"] .status-paid {
    background: rgba(52, 199, 89, 0.2);
    color: var(--ios-system-green);
}

body[data-page="renter-nebenkosten"] .status-overdue {
    background: rgba(255, 59, 48, 0.2);
    color: var(--ios-system-red);
}

body[data-page="renter-nebenkosten"] .settlement-details {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

body[data-page="renter-nebenkosten"] .settlement-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body[data-page="renter-nebenkosten"] .settlement-balance {
    margin-top: 0.5em;
    padding-top: 0.5em;
    border-top: 1px solid var(--glass-border);
}

body[data-page="renter-nebenkosten"] .text-orange {
    color: var(--ios-system-orange);
}

body[data-page="renter-nebenkosten"] .text-green {
    color: var(--ios-system-green);
}

body[data-page="renter-nebenkosten"] .settlement-download {
    margin-top: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}

body[data-page="renter-nebenkosten"] .info-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

body[data-page="renter-nebenkosten"] .info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
}

body[data-page="renter-nebenkosten"] .info-item > div {
    display: flex;
    flex-direction: column;
}

/* COEUS — vendor-availability.css — Extracted from vendor-availability.html */

body[data-page="vendor-availability"] .schedule-grid {
    display: grid;
    gap: var(--spacing-sm);
}

body[data-page="vendor-availability"] .day-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}

body[data-page="vendor-availability"] .day-card.disabled {
    opacity: 0.6;
    background: var(--glass-secondary);
}

body[data-page="vendor-availability"] .day-card.disabled .time-inputs {
    pointer-events: none;
    opacity: 0.5;
}

body[data-page="vendor-availability"] .day-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
}

body[data-page="vendor-availability"] .day-name {
    font-weight: 600;
    min-width: 6em;
    color: var(--text-primary);
}

body[data-page="vendor-availability"] .time-inputs {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

body[data-page="vendor-availability"] .time-input {
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    font-family: inherit;
}

body[data-page="vendor-availability"] .time-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
}

/* Toggle Switch */
body[data-page="vendor-availability"] .toggle-switch {
    position: relative;
    display: inline-block;
    width: 3.2em;
    height: 1.8em;
}

body[data-page="vendor-availability"] .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

body[data-page="vendor-availability"] .toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    transition: .4s;
    border-radius: 2em;
}

body[data-page="vendor-availability"] .toggle-slider:before {
    position: absolute;
    content: "";
    height: 1.4em;
    width: 1.4em;
    left: 0.2em;
    bottom: 0.15em;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body[data-page="vendor-availability"] input:checked + .toggle-slider {
    background-color: var(--ios-system-green);
    border-color: var(--ios-system-green);
}

body[data-page="vendor-availability"] input:checked + .toggle-slider:before {
    transform: translateX(1.4em);
}

/* Settings Rows */
body[data-page="vendor-availability"] .setting-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="vendor-availability"] .setting-card:last-child {
    border-bottom: none;
}

body[data-page="vendor-availability"] .setting-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

body[data-page="vendor-availability"] .setting-input {
    width: 5em;
    text-align: center;
    padding: var(--spacing-xs);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

@media (max-width: 40em) {
    body[data-page="vendor-availability"] .day-card {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    body[data-page="vendor-availability"] .day-info {
        width: 100%;
        justify-content: space-between;
    }

    body[data-page="vendor-availability"] .time-inputs {
        width: 100%;
        justify-content: space-between;
    }

    body[data-page="vendor-availability"] .time-input {
        flex: 1;
    }
}

/* COEUS — vendors-page.css — Extracted from vendors.html */

/* Vendor type badges */
body[data-page="vendors"] .vendor-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--glass-secondary);
}

body[data-page="vendors"] .vendor-badge.marketplace {
    background: rgba(88, 86, 214, 0.2);
    color: var(--ios-system-indigo);
}

body[data-page="vendors"] .vendor-badge.internal {
    background: rgba(var(--ios-green-rgb), 0.2);
    color: var(--ios-system-green);
}

body[data-page="vendors"] .vendor-card.marketplace-vendor {
    border-left: 3px solid rgba(99, 102, 241, 0.5);
}

body[data-page="vendors"] .vendor-card.internal-vendor {
    border-left: 3px solid rgba(34, 197, 94, 0.5);
}

/* Read-only state for marketplace vendors */
body[data-page="vendors"] .vendor-editor-readonly .form-input,
body[data-page="vendors"] .vendor-editor-readonly .form-textarea,
body[data-page="vendors"] .vendor-editor-readonly .form-select {
    pointer-events: none;
    opacity: 0.7;
    background: var(--glass-secondary);
}

/* Notes and Active checkbox should always be editable (owner's personal data) */
body[data-page="vendors"] .vendor-editor-readonly #vendorNotes {
    pointer-events: auto;
    opacity: 1;
    background: var(--glass-primary);
    cursor: text;
}

body[data-page="vendors"] .vendor-editor-readonly #vendorIsActive {
    pointer-events: auto;
    opacity: 1;
    cursor: pointer;
}

/* Hide delete button for marketplace vendors (shown separately) */
body[data-page="vendors"] .vendor-editor-readonly .btn-delete {
    display: none;
}

body[data-page="vendors"] .marketplace-notice {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

body[data-page="vendors"] .marketplace-notice a {
    color: var(--ios-system-indigo);
    text-decoration: underline;
}

/* Tablet/Mobile View Toggle Styles */
body[data-page="vendors"] .mobile-back-btn {
    display: none;
}

@media (max-width: 64em) {
    body[data-page="vendors"] .mobile-back-btn {
        display: flex;
        align-items: center;
        gap: 0.5em;
        margin-bottom: 1em;
        padding: 0.5em 1em;
        background: var(--glass-secondary);
        border: 1px solid var(--glass-border);
        border-radius: 0.5em;
        color: var(--text-primary);
        font-weight: 500;
        cursor: pointer;
        transition: background 0.2s;
    }

    body[data-page="vendors"] .mobile-back-btn:hover {
        background: var(--glass-hover);
    }

    /* Default state: Show sidebar, hide content */
    body[data-page="vendors"] #vendorMainLayout:not(.mobile-content-active) .ios-sidebar {
        display: flex;
        width: 100%;
    }

    body[data-page="vendors"] #vendorMainLayout:not(.mobile-content-active) .ios-main-content {
        display: none;
    }

    /* Active state: Hide sidebar, show content */
    body[data-page="vendors"] #vendorMainLayout.mobile-content-active .ios-sidebar {
        display: none;
    }

    body[data-page="vendors"] #vendorMainLayout.mobile-content-active .ios-main-content {
        display: block;
        width: 100%;
    }

    /* Remove grid layout on tablet */
    body[data-page="vendors"] .ios-grid-layout {
        display: block;
    }
}

/* COEUS — renter-profile.css — Extracted from renter-profile.html */

body[data-page="renter-profile"] .renter-page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

body[data-page="renter-profile"] .header-title {
    flex: 1;
}

body[data-page="renter-profile"] .back-button {
    flex-shrink: 0;
}

body[data-page="renter-profile"] .profile-header-card {
    text-align: center;
}

body[data-page="renter-profile"] .profile-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

body[data-page="renter-profile"] .profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--glass-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

body[data-page="renter-profile"] .profile-avatar i {
    font-size: 2.5rem;
}

body[data-page="renter-profile"] .profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

body[data-page="renter-profile"] .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

body[data-page="renter-profile"] .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

body[data-page="renter-profile"] .form-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

body[data-page="renter-profile"] .form-input {
    background: var(--glass-secondary);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

body[data-page="renter-profile"] .form-input:focus {
    outline: none;
    background: var(--glass-hover);
}

body[data-page="renter-profile"] .form-input[readonly] {
    opacity: 0.7;
    cursor: not-allowed;
}

body[data-page="renter-profile"] .form-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

body[data-page="renter-profile"] .form-select {
    background: var(--glass-secondary);
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 120px;
}

body[data-page="renter-profile"] .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

body[data-page="renter-profile"] .primary-button {
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
}

body[data-page="renter-profile"] .settings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

body[data-page="renter-profile"] .setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="renter-profile"] .setting-item:last-child {
    border-bottom: none;
}

body[data-page="renter-profile"] .setting-item-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 0;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 1px solid var(--glass-border);
}

body[data-page="renter-profile"] .setting-item-button:last-child {
    border-bottom: none;
}

body[data-page="renter-profile"] .setting-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: left;
}

/* Toggle Switch */
body[data-page="renter-profile"] .toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

body[data-page="renter-profile"] .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

body[data-page="renter-profile"] .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-secondary);
    border-radius: 28px;
    transition: 0.3s;
}

body[data-page="renter-profile"] .toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

body[data-page="renter-profile"] .toggle-switch input:checked + .toggle-slider {
    background: var(--ios-system-green);
}

body[data-page="renter-profile"] .toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

body[data-page="renter-profile"] .account-actions {
    display: flex;
    justify-content: center;
}

body[data-page="renter-profile"] .logout-button {
    color: var(--ios-system-red);
}

/* Toast */
body[data-page="renter-profile"] .toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

body[data-page="renter-profile"] .toast-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

body[data-page="renter-profile"] .toast-success {
    background: var(--ios-system-green);
    color: var(--button-text-on-color);
}

body[data-page="renter-profile"] .toast-error {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
}

@media (max-width: 600px) {
    body[data-page="renter-profile"] .form-row {
        grid-template-columns: 1fr;
    }
}

/* COEUS — renter-damage-report.css — Extracted from renter-damage-report.html */

body[data-page="renter-damage-report"] .renter-page-container {
    max-width: 50em;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

body[data-page="renter-damage-report"] .page-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

body[data-page="renter-damage-report"] .back-button {
    width: 2.5em;
    height: 2.5em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

body[data-page="renter-damage-report"] .damage-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

body[data-page="renter-damage-report"] .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

body[data-page="renter-damage-report"] .form-group label {
    font-weight: 500;
}

body[data-page="renter-damage-report"] .form-group input,
body[data-page="renter-damage-report"] .form-group textarea,
body[data-page="renter-damage-report"] .form-group select {
    padding: var(--spacing-md);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-size: 1em;
}

body[data-page="renter-damage-report"] .form-group textarea {
    min-height: 8em;
    resize: vertical;
}

body[data-page="renter-damage-report"] .form-group input:focus,
body[data-page="renter-damage-report"] .form-group textarea:focus,
body[data-page="renter-damage-report"] .form-group select:focus {
    outline: none;
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

body[data-page="renter-damage-report"] .severity-options {
    display: flex;
    gap: var(--spacing-sm);
}

body[data-page="renter-damage-report"] .severity-option {
    flex: 1;
    padding: var(--spacing-md);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-primary);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

body[data-page="renter-damage-report"] .severity-option:hover {
    background: var(--glass-hover);
}

body[data-page="renter-damage-report"] .severity-option.selected {
    border-color: var(--ios-system-orange);
    background: rgba(0, 122, 255, 0.1);
}

body[data-page="renter-damage-report"] .severity-option input {
    display: none;
}

body[data-page="renter-damage-report"] .severity-option.low.selected {
    border-color: var(--ios-system-green);
    background: rgba(52, 199, 89, 0.1);
}

body[data-page="renter-damage-report"] .severity-option.medium.selected {
    border-color: var(--ios-system-orange);
    background: rgba(255, 149, 0, 0.1);
}

body[data-page="renter-damage-report"] .severity-option.high.selected {
    border-color: var(--ios-system-red);
    background: rgba(255, 59, 48, 0.1);
}

body[data-page="renter-damage-report"] .photo-upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-page="renter-damage-report"] .photo-upload-area:hover {
    border-color: var(--ios-system-orange);
    background: var(--glass-primary);
}

body[data-page="renter-damage-report"] .photo-upload-area i {
    font-size: 2.5em;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-sm);
}

body[data-page="renter-damage-report"] .photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6em, 1fr));
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

body[data-page="renter-damage-report"] .photo-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
}

body[data-page="renter-damage-report"] .photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body[data-page="renter-damage-report"] .photo-preview .remove-photo {
    position: absolute;
    top: 0.25em;
    right: 0.25em;
    width: 1.5em;
    height: 1.5em;
    padding: 0;
    background: rgba(0, 0, 0, 0.6);
    color: var(--button-text-on-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875em;
}

body[data-page="renter-damage-report"] .submit-button {
    padding: var(--spacing-md) var(--spacing-xl);
    font-weight: 600;
    font-size: 1em;
}

body[data-page="renter-damage-report"] .success-message {
    padding: var(--spacing-lg);
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid var(--ios-system-green);
    border-radius: var(--radius-md);
    text-align: center;
    display: none;
}

body[data-page="renter-damage-report"] .success-message.visible {
    display: block;
}

body[data-page="renter-damage-report"] .success-message i {
    font-size: 2em;
    color: var(--ios-system-green);
    margin-bottom: var(--spacing-sm);
}

body[data-page="renter-damage-report"] .previous-reports {
    margin-top: var(--spacing-2xl);
}

body[data-page="renter-damage-report"] .report-card {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    background: var(--glass-primary);
    margin-bottom: var(--spacing-sm);
}

body[data-page="renter-damage-report"] .report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

body[data-page="renter-damage-report"] .report-status {
    padding: 0.25em 0.75em;
    border-radius: 1em;
    font-size: 0.75em;
    font-weight: 600;
}

body[data-page="renter-damage-report"] .report-status.reported {
    background: rgba(255, 149, 0, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="renter-damage-report"] .report-status.in_progress {
    background: rgba(0, 122, 255, 0.15);
    color: var(--ios-system-orange);
}

body[data-page="renter-damage-report"] .report-status.resolved {
    background: rgba(52, 199, 89, 0.15);
    color: var(--ios-system-green);
}

/* COEUS — renter-register.css — Extracted from renter-register.html */

body[data-page="renter-register"] .register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

body[data-page="renter-register"] .register-card {
    width: 100%;
    max-width: 28em;
}

body[data-page="renter-register"] .register-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

body[data-page="renter-register"] .brand-logo {
    font-family: var(--font-logo);
    font-size: 2em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

body[data-page="renter-register"] .property-info {
    padding: var(--spacing-md);
    background: var(--glass-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

body[data-page="renter-register"] .property-info i {
    font-size: 2em;
    color: var(--ios-system-orange);
    margin-bottom: var(--spacing-sm);
}

body[data-page="renter-register"] .register-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

body[data-page="renter-register"] .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

body[data-page="renter-register"] .form-group label {
    font-weight: 500;
}

body[data-page="renter-register"] .form-group input {
    padding: var(--spacing-md);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-primary);
    color: var(--text-primary);
    font-size: 1em;
}

body[data-page="renter-register"] .form-group input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

body[data-page="renter-register"] .form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Auth method selection */
body[data-page="renter-register"] .auth-method-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

body[data-page="renter-register"] .auth-method-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-page="renter-register"] .auth-method-btn:hover {
    background: var(--glass-hover);
    border-color: var(--ios-system-orange);
}

body[data-page="renter-register"] .auth-method-btn i {
    font-size: 1.5em;
    color: var(--ios-system-orange);
}

body[data-page="renter-register"] .auth-method-btn .btn-content {
    text-align: left;
}

body[data-page="renter-register"] .auth-method-btn .btn-title {
    font-weight: 600;
    color: var(--text-primary);
}

body[data-page="renter-register"] .auth-method-btn .btn-subtitle {
    font-size: 0.85em;
    color: var(--text-secondary);
}

/* OTP Code Inputs */
body[data-page="renter-register"] .code-inputs-container {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
}

body[data-page="renter-register"] .code-input {
    width: 2.5em;
    height: 3em;
    text-align: center;
    font-size: 1.5em;
    font-weight: 600;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-primary);
    color: var(--text-primary);
}

body[data-page="renter-register"] .code-input:focus {
    outline: none;
    border-color: var(--ios-system-orange);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

/* Step visibility */
body[data-page="renter-register"] .step-content {
    display: none;
}

body[data-page="renter-register"] .step-content.active {
    display: block;
}

body[data-page="renter-register"] .submit-button {
    padding: var(--spacing-md);
    font-weight: 600;
    font-size: 1em;
    margin-top: var(--spacing-md);
}

body[data-page="renter-register"] .error-message {
    padding: var(--spacing-md);
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid var(--ios-system-red);
    border-radius: var(--radius-md);
    color: var(--ios-system-red);
    text-align: center;
    display: none;
}

body[data-page="renter-register"] .error-message.visible {
    display: block;
}

body[data-page="renter-register"] .success-state {
    text-align: center;
    display: none;
}

body[data-page="renter-register"] .success-state.visible {
    display: block;
}

body[data-page="renter-register"] .success-state i {
    font-size: 3em;
    color: var(--ios-system-green);
    margin-bottom: var(--spacing-md);
}

body[data-page="renter-register"] .loading-state {
    text-align: center;
    padding: var(--spacing-xl);
}

body[data-page="renter-register"] .loading-state i {
    font-size: 2em;
    color: var(--text-tertiary);
    animation: renter-register-spin 1s linear infinite;
}

@keyframes renter-register-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body[data-page="renter-register"] .invalid-token {
    text-align: center;
    display: none;
}

body[data-page="renter-register"] .invalid-token.visible {
    display: block;
}

body[data-page="renter-register"] .invalid-token i {
    font-size: 3em;
    color: var(--ios-system-red);
    margin-bottom: var(--spacing-md);
}

body[data-page="renter-register"] .login-link {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
}

/**
 * COEUS Design System - Chat4 Page Styles
 *
 * PURPOSE:
 * Page-specific styles for chat4.html - token-optimized admin chat interface
 *
 * COMPONENTS:
 * - Chat4 Container: Full-viewport flex layout
 * - Chat4 Header: Transparent header with stats and controls
 * - Chat4 Messages: Scrollable message area with dark glass bubbles
 * - Chat4 Welcome: Centered welcome screen with personalization
 * - Chat4 Input: Bottom input area with send/voice/upload buttons
 * - Model Selector: Small/Medium/Large model toggle
 * - Agent Toggle: Always-respond vs mention-only switch
 * - Mention Autocomplete: Dropdown for @-mentions
 * - Collaborative Controls: Participant avatars and add-participant modal
 * - Document Preview: File upload preview bar
 * - Modal: Add-participants modal overlay
 *
 * DEPENDENCIES: coeus-v2.css (variables, glass system, themes)
 * PAGE SELECTOR: body[data-page="chat4"]
 * LAST UPDATED: 2026-03-03 - Extracted from inline <style> in chat4.html
 */

/* ============================================ */
/*          CHAT4 CONTAINER LAYOUT              */
/* ============================================ */

.chat4-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Left padding for chat content areas - uses page-specific selector for high specificity */
/* Note: Header and footer extend edge-to-edge, only messages/welcome get extra padding */
body[data-page="chat4"] .chat4-messages,
body[data-page="chat4"] .chat4-welcome {
    padding-left: 2.5vw;
}

@media (max-width: 48em) {
    body[data-page="chat4"] .chat4-messages,
    body[data-page="chat4"] .chat4-welcome {
        padding-left: 1rem;
    }
}

/* ============================================ */
/*          CHAT4 HEADER                        */
/* ============================================ */

.chat4-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: transparent;
    border-bottom: none;
}

.chat4-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
}

.chat4-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.chat4-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.chat4-stat-value {
    font-weight: 600;
    color: var(--ios-system-green);
}

.chat4-stat-reduction {
    color: var(--ios-system-orange);
    font-weight: 600;
}

/* ============================================ */
/*          CHAT4 MESSAGES                      */
/* ============================================ */

.chat4-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: transparent;
}

.chat4-message {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    /* Match sidebar dark glass styling */
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(60px) saturate(150%);
    -webkit-backdrop-filter: blur(60px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    /* Match sidebar font size */
    font-size: var(--ios-caption2-base);
    font-weight: 500;
}

.chat4-message.user {
    align-self: flex-end;
    max-width: 80%;
}

.chat4-message.assistant {
    align-self: flex-start;
    max-width: 85%;
}

/* Markdown styling in assistant messages */
.chat4-message.assistant strong {
    font-weight: 600;
}

.chat4-message.assistant em {
    font-style: italic;
}

.chat4-message.assistant code {
    background: var(--glass-secondary);
    padding: 0.125em 0.375em;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.9em;
}

.chat4-message.assistant pre {
    background: var(--glass-secondary);
    padding: 0.75em 1em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.5em 0;
}

.chat4-message.assistant pre code {
    background: none;
    padding: 0;
}

.chat4-message.assistant h2,
.chat4-message.assistant h3,
.chat4-message.assistant h4 {
    font-weight: 600;
    margin: 0.5em 0 0.25em 0;
}

.chat4-message.system {
    align-self: center;
    background: var(--glass-primary);
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
}

/* ============================================ */
/*          TOOL INDICATOR                      */
/* ============================================ */

.chat4-tool-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--glass-primary);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.chat4-tool-indicator.executing {
    animation: chat4-pulse 1.5s infinite;
}

@keyframes chat4-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================ */
/*          CHAT4 INPUT AREA                    */
/* ============================================ */

.chat4-input-container {
    padding: 0.75em 1em 1.5em;
    background: transparent;
    border-top: none;
    display: flex;
    gap: 0.75em;
    align-items: flex-end;
    max-width: 56.25em;
    width: 100%;
    align-self: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

.chat4-input {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--input-border);
    border-radius: 1.25rem;
    background: var(--input-bg);
    color: var(--input-text);
    font-size: 1rem;
    resize: none;
    outline: none;
}

.chat4-input:focus {
    border-color: var(--input-border-focus);
    background: var(--input-bg-focus);
}

.chat4-input::placeholder {
    color: var(--input-placeholder);
}

/* ============================================ */
/*          SEND BUTTON                         */
/* ============================================ */

.chat4-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ios-system-orange);
    color: var(--button-text-on-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.chat4-send-btn:hover {
    transform: scale(1.05);
}

.chat4-send-btn:active {
    transform: scale(0.95);
}

.chat4-send-btn:disabled {
    background: var(--glass-secondary);
    cursor: not-allowed;
}

/* ============================================ */
/*          WELCOME SCREEN                      */
/* ============================================ */

.chat4-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.chat4-welcome-title {
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.chat4-welcome-title .user-name {
    color: inherit;
}

.chat4-welcome-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 36rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ============================================ */
/*          BADGE & NEW CHAT BUTTON             */
/* ============================================ */

.chat4-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--ios-system-green);
    color: var(--button-text-on-color);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.chat4-new-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease;
}

.chat4-new-btn:hover {
    background: var(--glass-hover);
}

/* ============================================ */
/*          TYPING INDICATOR                    */
/* ============================================ */

.typing-indicator {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: chat4-typing 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chat4-typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* ============================================ */
/*          MODEL SELECTOR                      */
/* ============================================ */

.model-selector {
    display: flex;
    gap: 0.25rem;
    background: var(--glass-secondary);
    padding: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--glass-border);
}

.model-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.model-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.model-btn.active {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid transparent;
    background-image: linear-gradient(var(--glass-secondary), var(--glass-secondary)),
                      linear-gradient(135deg, #ff6b35, #f7931e, #ffb347, #ff6b35);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 12px rgba(247, 147, 30, 0.5),
                0 0 24px rgba(255, 107, 53, 0.3);
}

/* ============================================ */
/*          VOICE INPUT BUTTON                  */
/* ============================================ */

.chat4-voice-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chat4-voice-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.chat4-voice-btn.recording {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
    border-color: var(--ios-system-red);
    animation: chat4-pulse-recording 1s infinite;
}

@keyframes chat4-pulse-recording {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.chat4-voice-btn.not-supported {
    display: none;
}

/* ============================================ */
/*          FILE UPLOAD BUTTON                  */
/* ============================================ */

.chat4-upload-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chat4-upload-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.chat4-upload-btn.uploading {
    animation: chat4-pulse 1.5s infinite;
    color: var(--ios-system-orange);
}

/* ============================================ */
/*          DOCUMENT PREVIEW                    */
/* ============================================ */

body[data-page="chat4"] .document-preview {
    padding: 0.5rem 1rem;
    background: var(--glass-primary);
    border-top: 1px solid var(--glass-border);
}

body[data-page="chat4"] .document-preview-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--glass-secondary);
    border-radius: 0.75rem;
    border: 1px solid var(--glass-border);
}

body[data-page="chat4"] .document-icon {
    width: 24px;
    height: 24px;
    color: var(--ios-system-orange);
    flex-shrink: 0;
}

body[data-page="chat4"] .document-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

body[data-page="chat4"] .document-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="chat4"] .document-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

body[data-page="chat4"] .document-status.success {
    color: var(--ios-system-green);
}

body[data-page="chat4"] .document-status.error {
    color: var(--ios-system-red);
}

body[data-page="chat4"] .document-actions {
    display: flex;
    gap: 0.5rem;
}

.doc-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.doc-action-btn.save {
    background: var(--ios-system-green);
    color: var(--button-text-on-color);
}

.doc-action-btn.save:disabled {
    background: var(--glass-secondary);
    color: var(--text-tertiary);
    cursor: not-allowed;
}

.doc-action-btn.discard {
    background: var(--glass-secondary);
    color: var(--text-secondary);
}

.doc-action-btn.discard:hover {
    background: var(--ios-system-red);
    color: var(--button-text-on-color);
}

/* ============================================ */
/*          AGENT TOGGLE                        */
/* ============================================ */

.agent-toggle-container {
    display: flex;
    align-items: center;
}

.agent-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.agent-toggle input {
    display: none;
}

.agent-toggle-slider {
    width: 36px;
    height: 20px;
    background: var(--glass-secondary);
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
    border: 1px solid var(--glass-border);
}

.agent-toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--text-tertiary);
    border-radius: 50%;
    top: 1px;
    left: 1px;
    transition: all 0.2s;
}

.agent-toggle input:checked + .agent-toggle-slider {
    background: var(--ios-system-green);
    border-color: var(--ios-system-green);
}

.agent-toggle input:checked + .agent-toggle-slider::after {
    transform: translateX(16px);
    background: white;
}

.agent-toggle-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ============================================ */
/*          MENTION AUTOCOMPLETE                */
/* ============================================ */

/* Mention highlight in input */
.mention-highlight {
    color: var(--ios-system-orange);
    font-weight: 600;
}

/* Contenteditable placeholder */
.chat-input-editable:empty::before {
    content: attr(data-placeholder);
    color: var(--text-tertiary);
    pointer-events: none;
}

/* Mention inline styling */
.mention-inline {
    color: var(--accent-primary);
    font-weight: 600;
    cursor: default;
}

.mention-inline.mention-coeus {
    color: var(--accent-primary);
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    font-style: italic;
}

/* Mention dropdown */
.mention-dropdown {
    position: fixed;
    min-width: 10em;
    max-width: 16em;
    max-height: 8em;
    overflow-y: auto;
    background: var(--glass-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    padding: 0.25em 0;
}

.mention-dropdown.hidden {
    display: none;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.75em;
    cursor: pointer;
    transition: background 0.1s ease;
}

.mention-item:hover,
.mention-item.selected {
    background: var(--glass-hover);
}

.mention-item .mention-type {
    font-size: 0.7em;
    color: var(--text-tertiary);
}

/* ============================================ */
/*          COLLABORATIVE CONTROLS              */
/* ============================================ */

/* Right side header controls wrapper */
.header-right-controls {
    display: flex;
    align-items: center;
    gap: 1em;
}

.collaborative-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.add-participant-btn {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.add-participant-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.add-participant-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ============================================ */
/*          PARTICIPANT INDICATORS              */
/* ============================================ */

.participant-indicators {
    display: flex;
    align-items: center;
    margin-left: 0.5em;
}

.participant-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--glass-secondary);
    border: 2px solid var(--glass-primary);
    margin-left: -0.5rem;
    position: relative;
    cursor: default;
    transition: transform 0.15s ease;
}

.participant-avatar:first-child {
    margin-left: 0;
}

.participant-avatar:hover {
    transform: scale(1.1);
    z-index: 10;
}

.participant-avatar.more {
    background: var(--glass-hover);
    font-size: 0.55em;
}

/* ============================================ */
/*          MODAL STYLES                        */
/* ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1em;
}

.modal-overlay.hidden {
    display: none;
}

.modal-container {
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: chat4-modal-slide-in 0.2s ease-out;
}

.modal-container.modal-md {
    max-width: 28em;
}

@keyframes chat4-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--glass-border);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25em;
    border-radius: 0.25em;
    transition: color 0.15s ease;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1em 1.25em;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    gap: 0.75em;
    justify-content: flex-end;
    padding: 1em 1.25em;
    border-top: 1px solid var(--glass-border);
}

/* ============================================ */
/*          PARTICIPANT SEARCH & LIST           */
/* ============================================ */

.participant-search-input {
    width: 100%;
    padding: 0.75em 1em;
    background: var(--glass-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5em;
    color: var(--text-primary);
    margin-bottom: 1em;
}

.participant-search-input::placeholder {
    color: var(--text-tertiary);
}

/* Member list */
.member-list {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    max-height: 20em;
    overflow-y: auto;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em;
    border-radius: 0.5em;
    cursor: pointer;
    transition: background 0.15s ease;
}

.member-item:hover {
    background: var(--glass-hover);
}

.member-item.selected {
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.member-avatar {
    width: 2.25em;
    height: 2.25em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--glass-secondary);
    flex-shrink: 0;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-primary);
}

.member-email {
    font-size: 0.75em;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loading-indicator {
    text-align: center;
    padding: 2em;
    color: var(--text-tertiary);
}

/* ============================================ */
/*          PRIMARY BUTTON VARIANT              */
/* ============================================ */

.glass-button.primary {
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: var(--button-text-on-color);
    border: none;
}


/* COEUS — marketplace-vendor.css — Extracted from marketplace-vendor.html */

/* Back link container */
.back-link-container {
    padding-top: 3rem;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color 0.2s ease;
    margin-bottom: var(--spacing-md);
}
.back-link:hover { color: var(--text-primary); }

/* Social-media style Hero with Banner */
.vendor-hero {
    position: relative;
    margin-bottom: var(--spacing-xl);
}

.vendor-banner {
    height: 22em;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.vendor-banner img {
    position: absolute;
    display: block;
}

.vendor-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

/* Bar at bottom of banner: avatar + name + location + buttons */
.vendor-hero-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-xl);
    z-index: 5;
}

.vendor-avatar {
    width: 11.25em;
    height: 11.25em;
    flex-shrink: 0;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.25);
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #48dbfb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.vendor-avatar {
    position: relative;
}
.vendor-avatar img {
    position: absolute;
    display: block;
}

.vendor-avatar-initials {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--button-text-on-color);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.vendor-hero-name-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    flex: 1;
    min-width: 0;
}

.vendor-hero-name-group h1 {
    font-size: 1.25em;
    font-weight: 600;
    color: var(--button-text-on-color);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vendor-hero-location {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.875em;
    white-space: nowrap;
}

.vendor-hero-rating {
    display: flex;
    align-items: center;
    gap: 0.15em;
}

.vendor-hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

@media (max-width: 48em) {
    .vendor-hero-bar {
        flex-wrap: wrap;
    }
    .vendor-hero-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}

.vendor-profile-grid {
    display: grid;
    gap: var(--spacing-xl);
    grid-template-columns: 1fr;
}

@media (min-width: 64em) {
    .vendor-profile-grid {
        grid-template-columns: 20em 1fr;
    }
}

.category-tag {
    display: inline-flex;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    font-size: 0.875em;
    color: var(--text-secondary);
}

/* Contact sidebar card */
.contact-sidebar {
    display: flex;
    flex-direction: column;
}

.contact-items-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
    transition: color 0.2s;
    font-size: 0.9375rem;
}

.contact-item:hover {
    color: var(--text-primary);
}

.contact-item a {
    color: inherit;
    text-decoration: none;
}

.contact-item .radix-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.7;
}

/* Info rows in sidebar */
.sidebar-info-row {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.sidebar-info-row:last-child {
    margin-bottom: 0;
}

.sidebar-info-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sidebar-info-label .radix-icon {
    width: 1rem;
    height: 1rem;
    opacity: 0.6;
}

.sidebar-info-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
    padding-left: 1.5rem;
}

.sidebar-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    padding-left: 1.5rem;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ios-system-orange);
    font-weight: 500;
}

/* Service pricing in Dienstleistungen */
.service-pricing-grid {
    display: grid;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.service-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
}

.service-price-name {
    color: var(--text-primary);
    font-weight: 500;
}

.service-price-value {
    color: var(--ios-system-green);
    font-weight: 600;
}

/* Ueber uns description -- rich text rendering */
.vendor-description {
    line-height: 1.7;
}

.vendor-description p { margin-bottom: 1em; }
.vendor-description strong, .vendor-description b { font-weight: 600; color: var(--text-primary); }
.vendor-description em, .vendor-description i { font-style: italic; }
.vendor-description u { text-decoration: underline; }
.vendor-description s, .vendor-description strike { text-decoration: line-through; }
.vendor-description ul, .vendor-description ol { margin: 1em 0; padding-left: 1.5em; }
.vendor-description li { margin-bottom: 0.5em; }
.vendor-description h1 { font-size: 2em; font-weight: 700; margin-bottom: 0.5em; color: var(--text-primary); }
.vendor-description h2 { font-size: 1.5em; font-weight: 600; margin-bottom: 0.5em; color: var(--text-primary); }
.vendor-description h3 { font-size: 1.25em; font-weight: 600; margin-bottom: 0.5em; color: var(--text-primary); }
.vendor-description h4 { font-size: 1.1em; font-weight: 600; margin-bottom: 0.5em; color: var(--text-primary); }
.vendor-description blockquote {
    border-left: 3px solid var(--glass-border);
    padding-left: 1em;
    margin: 1em 0;
    color: var(--text-tertiary);
    font-style: italic;
}
.vendor-description font[size="1"] { font-size: 0.75em; }
.vendor-description font[size="2"] { font-size: 0.875em; }
.vendor-description font[size="3"] { font-size: 1em; }
.vendor-description font[size="4"] { font-size: 1.25em; }
.vendor-description font[size="5"] { font-size: 1.5em; }
.vendor-description font[size="6"] { font-size: 2em; }
.vendor-description font[size="7"] { font-size: 2.5em; }
.vendor-description div, .vendor-description p { text-align: inherit; }

/* Chat Modal - Centered */
#contactModal.modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 1.5rem !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 9999 !important;
}

#contactModal.modal-overlay.hidden {
    display: none !important;
}

#contactModal .chat-modal {
    display: flex;
    flex-direction: column;
    width: 380px;
    max-width: calc(100vw - 2rem);
    max-height: 480px;
    background: rgba(30, 32, 38, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}

#contactModal .chat-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

#contactModal .chat-modal-recipient {
    display: flex;
    align-items: center;
    gap: 10px;
}

#contactModal .chat-modal-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875em;
    color: var(--button-text-on-color);
    overflow: hidden;
    flex-shrink: 0;
}

#contactModal .chat-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#contactModal .chat-modal-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

#contactModal .chat-modal-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875em;
    line-height: 1.2;
}

#contactModal .chat-modal-status {
    font-size: 0.6875em;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 4px;
}

#contactModal .chat-modal-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34C759;
}

#contactModal .chat-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--glass-primary);
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

#contactModal .chat-close-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

#contactModal .chat-modal-body {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

#contactModal .chat-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#contactModal .chat-subject-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#contactModal .chat-subject-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.625em;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

#contactModal .chat-subject-label svg {
    width: 10px;
    height: 10px;
    opacity: 0.6;
}

#contactModal .chat-subject-input {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--glass-border) !important;
    border-radius: 0 !important;
    padding: 0.5em 0 !important;
    color: var(--text-primary) !important;
    font-size: 0.875em !important;
    outline: none !important;
    box-shadow: none !important;
}

#contactModal .chat-subject-input:focus {
    border-bottom-color: rgba(0, 122, 255, 0.6) !important;
}

#contactModal .chat-subject-input::placeholder {
    color: var(--text-quaternary);
}

#contactModal .chat-input-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#contactModal .chat-textarea {
    background: var(--glass-secondary) !important;
    border: none !important;
    border-radius: 0.75em !important;
    padding: 0.75em !important;
    color: var(--text-primary) !important;
    font-size: 0.875em !important;
    line-height: 1.5;
    resize: none;
    min-height: 80px;
    outline: none !important;
    box-shadow: none !important;
}

#contactModal .chat-textarea:focus {
    background: var(--glass-hover) !important;
}

#contactModal .chat-textarea::placeholder {
    color: var(--text-quaternary);
}

/* Attachment preview */
#contactModal .chat-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#contactModal .chat-attachment-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    font-size: 0.75em;
    color: var(--text-secondary);
}

#contactModal .chat-attachment-item img {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
}

#contactModal .chat-attachment-remove {
    background: none;
    border: none;
    color: var(--text-quaternary);
    cursor: pointer;
    padding: 0;
    font-size: 0.875em;
    line-height: 1;
}

#contactModal .chat-attachment-remove:hover {
    color: var(--ios-system-red);
}

#contactModal .chat-input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 4px;
}

#contactModal .chat-attach-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

#contactModal .chat-attach-btn:hover {
    background: var(--glass-primary);
    color: var(--text-secondary);
}

#contactModal .chat-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

#contactModal .chat-action-btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8125em;
    font-weight: 500;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

#contactModal .chat-action-btn:hover {
    color: var(--text-primary);
    background: var(--glass-secondary);
}

#contactModal .chat-send-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8125em;
    font-weight: 600;
    color: var(--button-text-on-color);
    background: var(--accent-primary);
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

#contactModal .chat-send-btn:hover:not(:disabled) {
    background: #0066d6;
}

#contactModal .chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#contactModal .chat-send-btn svg {
    width: 14px;
    height: 14px;
}

/* Success Toast */
.success-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--ios-system-green);
    color: var(--button-text-on-color);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9375rem;
    box-shadow: 0 4px 20px rgba(52, 199, 89, 0.4);
    z-index: 9999;
    animation: slideUp 0.3s ease-out;
}

.success-toast.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-0.5rem);
    }
}


/**
 * PERFORMANCE METRICS:
 * - Uncompressed: ~180KB (down from 470KB)
 * - Gzipped: ~28KB (down from 79KB)
 * - First Paint: ~1.1s (down from 1.8s)
 * - Classes: 60 (down from 150+)
 *
 * MIGRATION GUIDE:
 * Run the migration script to update HTML files:
 * node migrate-css.js
 *
 * BROWSER SUPPORT:
 * - Chrome 90+
 * - Safari 14+
 * - Firefox 88+
 * - Edge 90+
 *
 * CREDITS:
 * Designed by architect-supreme for COEUS v2.0
 * Data-driven architecture based on 1,407 element analysis
 */
/* --- Menubar language switcher dropdown (added for i18n rollout) --- */
.menubar-language-dropdown {
  z-index: var(--z-popover, 60);
  min-width: 10em;
  padding: 0.375em;
  border-radius: var(--radius-md, 1em);
  background: var(--glass-modal-bg, var(--glass-primary));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 0.5em 1.5em rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.125em;
}
.menubar-language-option {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  padding: 0.5em 0.75em;
  border-radius: var(--radius-sm, 0.5em);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.menubar-language-option:hover,
.menubar-language-option:focus-visible {
  background: var(--glass-hover);
  outline: none;
}
.menubar-language-option.is-active {
  background: var(--glass-secondary);
  color: var(--accent-primary);
  font-weight: 600;
}

/* --- Public-pages language switcher: inline chip row pinned top-right --- */
.public-lang-switcher {
  position: fixed;
  top: 1em;
  right: 1em;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 0.125em;
  padding: 0.375em 0.625em;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0.25em 0.75em rgba(0, 0, 0, 0.25);
  font: 600 0.8em/1 'Figtree', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0.06em;
}
.public-lang-switcher-chip {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font: inherit;
  cursor: pointer;
  padding: 0.375em 0.625em;
  border-radius: 9999px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.public-lang-switcher-chip:hover,
.public-lang-switcher-chip:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}
.public-lang-switcher-chip.is-active {
  color: #fff;
  background: var(--accent-primary, #FF9500);
}
.public-lang-switcher-sep {
  color: rgba(255, 255, 255, 0.35);
  user-select: none;
  font-weight: 400;
}

/* Light themes: invert the pill so it stays readable on white backgrounds */
[data-theme="light"] .public-lang-switcher,
[data-theme="lightmodern"] .public-lang-switcher {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 0.25em 0.75em rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .public-lang-switcher-chip,
[data-theme="lightmodern"] .public-lang-switcher-chip {
  color: rgba(0, 0, 0, 0.55);
}
[data-theme="light"] .public-lang-switcher-chip:hover,
[data-theme="lightmodern"] .public-lang-switcher-chip:hover,
[data-theme="light"] .public-lang-switcher-chip:focus-visible,
[data-theme="lightmodern"] .public-lang-switcher-chip:focus-visible {
  color: rgba(0, 0, 0, 0.9);
  background: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .public-lang-switcher-chip.is-active,
[data-theme="lightmodern"] .public-lang-switcher-chip.is-active {
  color: #fff;
}
[data-theme="light"] .public-lang-switcher-sep,
[data-theme="lightmodern"] .public-lang-switcher-sep {
  color: rgba(0, 0, 0, 0.25);
}

/* On narrow screens, collapse the gap slightly */
@media (max-width: 30em) {
  .public-lang-switcher { padding: 0.25em 0.5em; font-size: 0.75em; }
  .public-lang-switcher-chip { padding: 0.3em 0.5em; }
}
