global.css 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. /* =============================================================================
  2. DIWO Vergleich - Global CSS
  3. =============================================================================
  4. Gemeinsame Stile die von allen Seiten verwendet werden:
  5. - CSS Custom Properties (Variablen)
  6. - Reset & Base Styles
  7. - Layout Components
  8. - Form Elements
  9. - Button Styles
  10. - Table Styles
  11. - Section Components (Collapsible Sections)
  12. ============================================================================= */
  13. /* =============================================================================
  14. CSS CUSTOM PROPERTIES (VARIABLEN)
  15. ============================================================================= */
  16. :root {
  17. /* Standard Farben mit verbessertem Kontrast */
  18. --rot-hell: #ffe6e6;
  19. --gelb-hell: #fff8db;
  20. --gruen-hell: #e8f5e8;
  21. --rot: #b30000;
  22. --gelb: #9d5502;
  23. --gruen: #004d26;
  24. --weiss: #ffffff;
  25. --schwarz: #000000;
  26. --grau-hell: #f7f9fa;
  27. --grau-stark: #d7d8d9;
  28. --diwo-blau: #145c9e;
  29. --diwo-blau-hell: #cfe8fc;
  30. /* Focus Ring Farbe für bessere Sichtbarkeit */
  31. --focus-color: #0066cc;
  32. --focus-outline: 3px solid var(--focus-color);
  33. }
  34. /* Alternative Farben mit besserem Kontrast */
  35. :root[data-color-scheme="alternative"] {
  36. --rot-hell: #ffe6f5;
  37. --gelb-hell: #ffeccc;
  38. --gruen-hell: #e6f9ff;
  39. --rot: #cc0044;
  40. --gelb: #b8620e;
  41. --gruen: #008a8a;
  42. }
  43. /* =============================================================================
  44. RESET & BASE STYLES
  45. ============================================================================= */
  46. * {
  47. box-sizing: border-box;
  48. }
  49. body {
  50. margin: 0;
  51. padding: 16px;
  52. background: var(--grau-hell);
  53. color: var(--schwarz);
  54. font: 14px/1.5 system-ui, sans-serif;
  55. }
  56. h1, h2, h3 {
  57. margin: 0.2rem 0 0.6rem;
  58. line-height: 1.3;
  59. }
  60. /* Focus-Stile für bessere Keyboard-Navigation */
  61. *:focus {
  62. outline: var(--focus-outline);
  63. outline-offset: 2px;
  64. }
  65. button:focus,
  66. select:focus,
  67. input:focus,
  68. .person-row:focus,
  69. .section-header:focus {
  70. outline: var(--focus-outline);
  71. outline-offset: 2px;
  72. }
  73. tr:focus {
  74. outline: var(--focus-outline);
  75. outline-offset: 1px;
  76. position: relative;
  77. z-index: 1;
  78. }
  79. /* =============================================================================
  80. LAYOUT COMPONENTS
  81. ============================================================================= */
  82. .row {
  83. display: flex;
  84. gap: 0.5rem;
  85. align-items: center;
  86. }
  87. .grid-2 {
  88. display: grid;
  89. grid-template-columns: 1fr 1fr;
  90. gap: 12px;
  91. }
  92. .grid-2 .full {
  93. grid-column: 1/-1;
  94. }
  95. .error-box {
  96. background: var(--rot-hell);
  97. border-left: 4px solid var(--rot);
  98. padding: 0.6rem;
  99. margin: 0.6rem 0;
  100. border-radius: 4px;
  101. }
  102. /* =============================================================================
  103. FORM ELEMENTS
  104. ============================================================================= */
  105. textarea,
  106. input,
  107. select {
  108. width: 100%;
  109. padding: 0.5rem;
  110. background: var(--weiss);
  111. color: var(--schwarz);
  112. border: 2px solid var(--grau-stark);
  113. border-radius: 4px;
  114. font-size: 14px;
  115. }
  116. textarea:hover,
  117. input:hover,
  118. select:hover {
  119. border-color: var(--diwo-blau);
  120. }
  121. .control-group {
  122. display: flex;
  123. align-items: center;
  124. gap: 8px;
  125. }
  126. .control-group label {
  127. font-size: 13px;
  128. font-weight: bold;
  129. white-space: nowrap;
  130. }
  131. /* =============================================================================
  132. BUTTON STYLES
  133. ============================================================================= */
  134. button {
  135. padding: 0.5rem 0.9rem;
  136. border: 2px solid var(--grau-stark);
  137. background: var(--weiss);
  138. cursor: pointer;
  139. font-size: 14px;
  140. min-height: 44px;
  141. transition: all 0.2s ease;
  142. }
  143. button:hover {
  144. background: var(--grau-hell);
  145. border-color: var(--diwo-blau);
  146. }
  147. button:active {
  148. transform: translateY(1px);
  149. }
  150. /* =============================================================================
  151. TABLE STYLES
  152. ============================================================================= */
  153. table {
  154. width: 100%;
  155. border-collapse: collapse;
  156. background: var(--weiss);
  157. border: 1px solid var(--grau-stark);
  158. margin: 0.6rem 0 1rem;
  159. border-spacing: 0;
  160. }
  161. th, td {
  162. border: 1px solid var(--grau-stark);
  163. padding: 0.5rem;
  164. vertical-align: top;
  165. text-align: left;
  166. }
  167. th {
  168. background: var(--grau-stark);
  169. position: sticky;
  170. top: 0;
  171. font-weight: bold;
  172. color: var(--schwarz);
  173. }
  174. /* Symbol-Spalte */
  175. .sym {
  176. width: 2.5rem;
  177. min-width: 2.5rem;
  178. max-width: 2.5rem;
  179. text-align: center;
  180. font-weight: 700;
  181. font-size: 16px;
  182. }
  183. .sym.plus {
  184. color: var(--gruen);
  185. }
  186. .sym.minus {
  187. color: var(--rot);
  188. }
  189. .sym.warn {
  190. color: var(--gelb);
  191. }
  192. /* Diff-Highlighting für Tabellenzeilen */
  193. .diff-row-added {
  194. background: var(--gruen-hell);
  195. }
  196. .diff-row-removed {
  197. background: var(--rot-hell);
  198. }
  199. .cell-changed,
  200. td:has(.cell-changed) {
  201. background: var(--gelb-hell);
  202. }
  203. .cell-changed:not(.sym)::before {
  204. content: "! ";
  205. color: var(--gelb);
  206. font-weight: bold;
  207. font-size: 0.9em;
  208. margin-right: 4px;
  209. }
  210. .cell-added,
  211. td:has(.cell-added) {
  212. background: var(--gruen-hell);
  213. }
  214. .cell-added:not(.sym)::before {
  215. content: "+ ";
  216. color: var(--gruen);
  217. font-weight: bold;
  218. font-size: 0.9em;
  219. margin-right: 4px;
  220. }
  221. .cell-deleted,
  222. td:has(.cell-deleted) {
  223. background: var(--rot-hell);
  224. }
  225. .cell-deleted:not(.sym)::before {
  226. content: "− ";
  227. color: var(--rot);
  228. font-weight: bold;
  229. font-size: 0.9em;
  230. margin-right: 4px;
  231. }
  232. .old {
  233. display: block;
  234. font-size: 0.85em;
  235. margin-top: 0.2rem;
  236. opacity: 0.9;
  237. font-style: italic;
  238. }
  239. /* =============================================================================
  240. SECTION COMPONENTS (COLLAPSIBLE SECTIONS)
  241. ============================================================================= */
  242. .section-container {
  243. margin: 0.6rem 0 1rem;
  244. }
  245. .section-header {
  246. background: var(--grau-stark);
  247. padding: 12px 16px;
  248. border: 2px solid var(--grau-stark);
  249. border-radius: 4px 4px 0 0;
  250. cursor: pointer;
  251. display: flex;
  252. align-items: center;
  253. gap: 8px;
  254. user-select: none;
  255. transition: all 0.2s ease;
  256. min-height: 44px;
  257. }
  258. .section-header:hover {
  259. background: #c5c6c7;
  260. border-color: var(--diwo-blau);
  261. }
  262. .section-header h3 {
  263. margin: 0;
  264. font-size: 16px;
  265. font-weight: bold;
  266. }
  267. .toggle-icon {
  268. font-size: 14px;
  269. transition: transform 0.2s ease;
  270. font-weight: bold;
  271. }
  272. .toggle-icon.collapsed {
  273. transform: rotate(-90deg);
  274. }
  275. .section-content {
  276. border: 2px solid var(--grau-stark);
  277. border-top: none;
  278. border-radius: 0 0 4px 4px;
  279. transition: max-height 0.3s ease;
  280. overflow: visible;
  281. padding: 4px;
  282. }
  283. .section-content.collapsed {
  284. display: none;
  285. }
  286. .section-content table {
  287. margin: 0;
  288. border: none;
  289. }