You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

721 lines
16 KiB

  1. @use '../atoms/variables' as *;
  2. @use '../atoms/mixins' as *;
  3. // ─── Page ─────────────────────────────────────────────────────────────────────
  4. .report-page {
  5. @include page-shell;
  6. }
  7. // ─── Header ──────────────────────────────────────────────────────────────────
  8. .report-header {
  9. @include section-header;
  10. padding: $space-4 $space-6;
  11. @include tablet {
  12. flex-direction: column;
  13. align-items: stretch;
  14. gap: $space-3;
  15. }
  16. }
  17. .report-header__title {
  18. font-size: $font-size-xl;
  19. font-weight: $font-weight-bold;
  20. color: var(--header-text);
  21. }
  22. .report-header__right {
  23. display: flex;
  24. align-items: center;
  25. gap: $space-4;
  26. @include tablet {
  27. flex-wrap: wrap;
  28. }
  29. }
  30. // ─── Account-Name Anzeige ────────────────────────────────────────────────────
  31. .report-account-name {
  32. display: inline-flex;
  33. align-items: center;
  34. gap: $space-2;
  35. padding: $space-2 $space-4;
  36. font-size: $font-size-sm;
  37. font-weight: $font-weight-medium;
  38. color: var(--header-text);
  39. background: var(--header-overlay);
  40. border: 1px solid var(--header-overlay);
  41. border-radius: $radius-pill;
  42. backdrop-filter: blur(6px);
  43. -webkit-backdrop-filter: blur(6px);
  44. white-space: nowrap;
  45. &__icon {
  46. width: 16px;
  47. height: 16px;
  48. flex-shrink: 0;
  49. }
  50. }
  51. // ─── Disabled Tab ────────────────────────────────────────────────────────────
  52. .account-tab--disabled {
  53. opacity: 0.45;
  54. pointer-events: none;
  55. cursor: default;
  56. }
  57. // ─── Content ─────────────────────────────────────────────────────────────────
  58. .report-content {
  59. flex: 1;
  60. max-width: 1200px;
  61. width: 100%;
  62. margin: $space-6 auto;
  63. padding: 0 $space-6;
  64. @include tablet {
  65. padding: 0 $space-4;
  66. }
  67. }
  68. // ─── Karte ───────────────────────────────────────────────────────────────────
  69. .report-card {
  70. @include card;
  71. overflow: hidden;
  72. @include tablet { overflow-x: auto; }
  73. }
  74. // ─── Toolbar ─────────────────────────────────────────────────────────────────
  75. .report-toolbar {
  76. display: flex;
  77. align-items: center;
  78. justify-content: space-between;
  79. padding: $space-3 $space-5;
  80. border-bottom: 1px solid $color-border;
  81. @include tablet {
  82. flex-wrap: wrap;
  83. gap: $space-3;
  84. }
  85. }
  86. .report-toolbar__left {
  87. display: flex;
  88. align-items: center;
  89. gap: $space-6;
  90. }
  91. .report-toolbar__right {
  92. display: flex;
  93. align-items: center;
  94. gap: $space-2;
  95. }
  96. .report-toolbar__export {
  97. @include icon-btn(30px, $radius-sm);
  98. color: $color-text-light;
  99. svg { width: 18px; height: 18px; }
  100. &:hover {
  101. color: var(--color-primary);
  102. background: rgba(var(--color-primary-rgb), 0.08);
  103. }
  104. }
  105. .report-toolbar__separator {
  106. width: 1px;
  107. height: 18px;
  108. background: $color-border;
  109. margin: 0 $space-1;
  110. }
  111. .report-toolbar__action {
  112. display: inline-flex;
  113. align-items: center;
  114. gap: $space-2;
  115. font-size: $font-size-sm;
  116. font-weight: $font-weight-medium;
  117. color: var(--color-primary);
  118. cursor: pointer;
  119. text-decoration: none;
  120. svg {
  121. width: $icon-svg-size;
  122. height: $icon-svg-size;
  123. flex-shrink: 0;
  124. }
  125. &--disabled {
  126. color: $color-text-muted;
  127. pointer-events: none;
  128. cursor: default;
  129. }
  130. }
  131. // ─── Tabelle ─────────────────────────────────────────────────────────────────
  132. .report-table {
  133. width: 100%;
  134. @include tablet { min-width: 900px; }
  135. }
  136. .report-table__head,
  137. .report-table__row {
  138. display: grid;
  139. grid-template-columns:
  140. 110px // Datum
  141. 140px // Kunde
  142. 130px // Projekt
  143. 120px // Leistung
  144. 140px // Benutzer
  145. 1fr // Bemerkung
  146. 80px // Stunden
  147. 100px // Umsatz
  148. 88px; // Aktionen
  149. align-items: center;
  150. border-bottom: 1px solid $color-border;
  151. padding: 0 $space-5;
  152. }
  153. .report-table__head {
  154. padding-top: $space-2;
  155. padding-bottom: $space-2;
  156. .report-table__cell {
  157. font-size: $font-size-xs;
  158. font-weight: $font-weight-bold;
  159. color: $color-text-base;
  160. text-transform: uppercase;
  161. letter-spacing: 0.03em;
  162. line-height: 1.3;
  163. }
  164. }
  165. .report-table__row {
  166. padding-top: $space-3;
  167. padding-bottom: $space-3;
  168. transition: background $transition-fast;
  169. &:hover {
  170. background: rgba(var(--color-primary-rgb), 0.05);
  171. .report-action-btn { opacity: 1; }
  172. }
  173. &--invoiced .report-table__cell {
  174. &--date, &--client, &--project, &--service,
  175. &--user, &--note, &--duration, &--revenue {
  176. color: $color-text-light;
  177. }
  178. }
  179. &--editing {
  180. background: rgba(var(--color-primary-rgb), 0.05);
  181. .report-table__cell--actions { visibility: hidden; }
  182. }
  183. &:last-child { border-bottom: none; }
  184. }
  185. .report-table__cell {
  186. font-size: $font-size-base;
  187. color: $color-text-base;
  188. padding-right: $space-3;
  189. line-height: 1.4;
  190. min-width: 0;
  191. &--duration,
  192. &--revenue {
  193. text-align: right;
  194. padding-right: $space-4;
  195. white-space: nowrap;
  196. font-variant-numeric: tabular-nums;
  197. }
  198. &--actions {
  199. display: flex;
  200. align-items: center;
  201. justify-content: flex-end;
  202. gap: $space-1;
  203. padding-right: 0;
  204. }
  205. &--note {
  206. color: $color-text-muted;
  207. font-size: $font-size-sm;
  208. @include text-truncate;
  209. }
  210. }
  211. .report-table__sort-icon {
  212. margin-left: 2px;
  213. font-size: $font-size-xs;
  214. }
  215. .report-table__summary {
  216. display: block;
  217. font-size: $font-size-xs;
  218. font-weight: $font-weight-regular;
  219. color: $color-text-muted;
  220. margin-top: 1px;
  221. }
  222. .report-table__empty {
  223. padding: $space-10 $space-5;
  224. text-align: center;
  225. color: $color-text-muted;
  226. font-size: $font-size-sm;
  227. }
  228. // ─── Aktions-Buttons (Edit / Delete) ─────────────────────────────────────────
  229. .report-action-btn {
  230. @include icon-btn(26px, $radius-sm);
  231. opacity: 0;
  232. color: $color-text-light;
  233. svg { width: $icon-svg-size; height: $icon-svg-size; }
  234. @include tablet { opacity: 1; }
  235. &:hover {
  236. color: $color-text-muted;
  237. background: rgba($color-text-dark, 0.06);
  238. }
  239. &--delete:hover {
  240. color: $color-error;
  241. background: rgba($color-error, 0.08);
  242. }
  243. }
  244. // ─── Schloss-Button ──────────────────────────────────────────────────────────
  245. .report-lock {
  246. @include icon-btn(24px, $radius-sm);
  247. color: $color-text-light;
  248. svg { width: $icon-svg-size; height: $icon-svg-size; }
  249. &:hover {
  250. color: $color-text-muted;
  251. background: rgba($color-text-dark, 0.06);
  252. }
  253. &--invoiced {
  254. color: $color-text-dark;
  255. &:hover {
  256. color: $color-text-dark;
  257. background: rgba($color-text-dark, 0.06);
  258. }
  259. }
  260. }
  261. // ─── Inline-Edit-Formular ────────────────────────────────────────────────────
  262. .report-row__edit {
  263. grid-column: 1 / -1;
  264. padding: $space-4 0;
  265. background: rgba(var(--color-primary-rgb), 0.04);
  266. border-top: 1px solid $color-border;
  267. }
  268. .report-row__edit-grid {
  269. display: grid;
  270. grid-template-columns: 140px 1fr;
  271. gap: $space-3 $space-5;
  272. align-items: center;
  273. max-width: 680px;
  274. @include tablet {
  275. grid-template-columns: 1fr;
  276. gap: $space-3;
  277. }
  278. }
  279. .report-row__edit-label {
  280. @include form-label;
  281. @include tablet {
  282. text-align: left;
  283. padding-right: 0;
  284. }
  285. }
  286. .report-row__edit-field {
  287. display: flex;
  288. align-items: center;
  289. gap: $space-2;
  290. &--selects {
  291. gap: $space-3;
  292. .select {
  293. flex: 1;
  294. min-width: 160px;
  295. }
  296. @include tablet {
  297. flex-direction: column;
  298. .select {
  299. min-width: 0;
  300. width: 100%;
  301. }
  302. }
  303. }
  304. .textarea {
  305. width: 100%;
  306. }
  307. }
  308. .report-row__edit-actions {
  309. grid-column: 2;
  310. display: flex;
  311. gap: $space-3;
  312. padding-top: $space-2;
  313. @include tablet {
  314. grid-column: 1;
  315. .btn { flex: 1; }
  316. }
  317. }
  318. // ─── Pagination-Footer ────────────────────────────────────────────────────────
  319. .report-pagination {
  320. display: grid;
  321. grid-template-columns: 1fr 80px 100px 88px;
  322. align-items: center;
  323. padding: $space-3 $space-5;
  324. border-top: 1px solid $color-border;
  325. font-size: $font-size-sm;
  326. color: $color-text-muted;
  327. }
  328. .report-pagination__limits {
  329. display: flex;
  330. align-items: center;
  331. gap: $space-2;
  332. a {
  333. color: var(--color-primary);
  334. text-decoration: underline;
  335. cursor: pointer;
  336. &:hover { color: var(--color-primary-dark); }
  337. }
  338. strong {
  339. color: $color-text-dark;
  340. font-weight: $font-weight-bold;
  341. }
  342. }
  343. .report-pagination__duration,
  344. .report-pagination__revenue {
  345. text-align: right;
  346. padding-right: $space-4;
  347. font-weight: $font-weight-medium;
  348. color: $color-text-muted;
  349. font-variant-numeric: tabular-nums;
  350. white-space: nowrap;
  351. }
  352. .report-pagination__lock-spacer {
  353. // Platzhalter – hält Spalten-Ausrichtung mit der Tabelle
  354. }
  355. // ─── Toolbar-Button (klickbar) ────────────────────────────────────────────────
  356. button.report-toolbar__action {
  357. background: none;
  358. border: none;
  359. cursor: pointer;
  360. font-family: $font-family-base;
  361. padding: $space-1 $space-3;
  362. margin: (-$space-1) (-$space-3);
  363. border-radius: $radius-pill;
  364. transition: background $transition-fast, color $transition-fast;
  365. &--active {
  366. background: $color-text-dark;
  367. color: $color-white;
  368. svg path,
  369. svg circle {
  370. stroke: $color-white;
  371. }
  372. }
  373. }
  374. // ─── Filter-Panel ─────────────────────────────────────────────────────────────
  375. .report-filter {
  376. background: $color-card;
  377. border-bottom: 1px solid $color-border;
  378. padding: $space-5 $space-5 0;
  379. }
  380. .report-filter__body {
  381. display: flex;
  382. gap: $space-10;
  383. @include tablet {
  384. flex-direction: column;
  385. gap: $space-6;
  386. }
  387. }
  388. .report-filter__col {
  389. flex: 1;
  390. min-width: 0;
  391. max-width: 66%;
  392. @include tablet { max-width: 100%; }
  393. }
  394. .report-filter__heading {
  395. font-size: $font-size-xs;
  396. font-weight: $font-weight-bold;
  397. color: $color-text-muted;
  398. text-transform: uppercase;
  399. letter-spacing: 0.06em;
  400. margin-bottom: $space-3;
  401. }
  402. // ─── Filter-Row ───────────────────────────────────────────────────────────────
  403. .filter-row {
  404. display: grid;
  405. grid-template-columns: 160px 1fr;
  406. align-items: flex-start;
  407. gap: $space-3;
  408. padding: $space-2 0;
  409. border-bottom: 1px solid rgba($color-border, 0.6);
  410. &:last-child { border-bottom: none; }
  411. @include mobile {
  412. grid-template-columns: 1fr;
  413. }
  414. &--inactive {
  415. .filter-select,
  416. .filter-note-input,
  417. .filter-period-select,
  418. .filter-radio {
  419. opacity: 0.5;
  420. }
  421. .filter-select,
  422. .filter-note-input,
  423. .filter-period-select {
  424. color: $color-text-muted;
  425. }
  426. .filter-row__add,
  427. .filter-neg {
  428. opacity: 0.4;
  429. }
  430. .filter-neg {
  431. pointer-events: none;
  432. }
  433. }
  434. }
  435. .filter-row__label {
  436. display: flex;
  437. align-items: center;
  438. gap: $space-2;
  439. cursor: pointer;
  440. font-size: $font-size-sm;
  441. color: $color-text-base;
  442. padding-top: 7px;
  443. user-select: none;
  444. }
  445. .filter-row__checkbox {
  446. width: 14px;
  447. height: 14px;
  448. cursor: pointer;
  449. flex-shrink: 0;
  450. accent-color: var(--color-primary);
  451. }
  452. // ─── Body: Controls + Meta nebeneinander ────────────────────────────────────
  453. .filter-row__body {
  454. display: flex;
  455. align-items: flex-start;
  456. gap: $space-3;
  457. }
  458. .filter-row__controls {
  459. display: flex;
  460. flex-direction: column;
  461. gap: $space-2;
  462. min-width: 0;
  463. flex: 1;
  464. }
  465. .filter-row__control-group {
  466. display: flex;
  467. align-items: center;
  468. gap: $space-2;
  469. .filter-select,
  470. .filter-note-input {
  471. width: 300px;
  472. max-width: 100%;
  473. @include tablet { width: 100%; }
  474. }
  475. &--period {
  476. flex-direction: column;
  477. align-items: flex-start;
  478. gap: $space-2;
  479. }
  480. &--radio {
  481. padding-top: 7px;
  482. gap: $space-4;
  483. }
  484. }
  485. // ─── Meta: Plus-Button + Negativfilter ──────────────────────────────────────
  486. .filter-row__meta {
  487. display: flex;
  488. align-items: center;
  489. gap: $space-3;
  490. padding-top: 7px;
  491. flex-shrink: 0;
  492. white-space: nowrap;
  493. &--no-add {
  494. padding-left: calc(22px + #{$space-3});
  495. }
  496. }
  497. // ─── Plus- und Minus-Button ───────────────────────────────────────────────────
  498. .filter-row__add {
  499. @include icon-btn(22px, $radius-sm);
  500. border: 1px solid $color-input-border;
  501. background: $color-white;
  502. font-size: $font-size-md;
  503. line-height: 1;
  504. color: $color-text-muted;
  505. &:hover {
  506. border-color: var(--color-primary);
  507. color: var(--color-primary);
  508. }
  509. }
  510. .filter-row__remove {
  511. @include icon-btn(20px, $radius-sm);
  512. font-size: $font-size-md;
  513. line-height: 1;
  514. color: $color-text-light;
  515. &:hover {
  516. color: $color-error;
  517. background: rgba($color-error, 0.08);
  518. }
  519. }
  520. // ─── Zeitraum: Custom-Datumsfelder ───────────────────────────────────────────
  521. .filter-custom-dates {
  522. display: flex;
  523. flex-direction: column;
  524. gap: $space-2;
  525. margin-top: $space-2;
  526. }
  527. .filter-date-group {
  528. display: flex;
  529. align-items: center;
  530. gap: $space-2;
  531. }
  532. .filter-date-label {
  533. font-size: $font-size-sm;
  534. color: $color-text-muted;
  535. width: 26px;
  536. flex-shrink: 0;
  537. }
  538. .filter-date-select {
  539. width: auto;
  540. display: inline-block;
  541. &--sm {
  542. padding-right: $space-6;
  543. min-width: 60px;
  544. }
  545. &--month {
  546. padding-right: $space-6;
  547. min-width: 100px;
  548. }
  549. }
  550. // ─── Radio-Filter (Abgeschlossen?) ────────────────────────────────────────────
  551. .filter-radio {
  552. display: inline-flex;
  553. align-items: center;
  554. gap: $space-1;
  555. font-size: $font-size-sm;
  556. color: $color-text-base;
  557. cursor: pointer;
  558. user-select: none;
  559. accent-color: var(--color-primary);
  560. }
  561. // ─── Filter-Footer ────────────────────────────────────────────────────────────
  562. .report-filter__footer {
  563. display: flex;
  564. align-items: center;
  565. gap: $space-4;
  566. padding: $space-4 0;
  567. }
  568. .filter-footer__link {
  569. background: none;
  570. border: none;
  571. padding: 0;
  572. cursor: pointer;
  573. font-family: $font-family-base;
  574. font-size: $font-size-sm;
  575. color: $color-text-muted;
  576. text-decoration: underline;
  577. text-underline-offset: 2px;
  578. transition: color $transition-fast;
  579. &:hover { color: $color-text-base; }
  580. }
  581. // ─── Negativfilter-Checkbox ───────────────────────────────────────────────────
  582. .filter-neg {
  583. display: inline-flex;
  584. align-items: center;
  585. gap: $space-1;
  586. font-size: $font-size-sm;
  587. color: $color-text-muted;
  588. cursor: pointer;
  589. user-select: none;
  590. white-space: nowrap;
  591. input[type="checkbox"] {
  592. width: 13px;
  593. height: 13px;
  594. cursor: pointer;
  595. accent-color: $color-warning;
  596. flex-shrink: 0;
  597. }
  598. &:has(input:checked) {
  599. color: $color-warning;
  600. font-weight: $font-weight-medium;
  601. }
  602. }