/**
 * Frontend-Styles für FBM Dienst Stoppuhr
 */

.fbm-ds-stopwatch-container {
    --fbm-ds-text-scale: var(--fbm-journal-text-scale, var(--cirkle-a11y-scale, 1));
    max-width: 600px;
    margin: 20px auto;
    padding: calc(30px * var(--fbm-ds-text-scale));
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: calc(1rem * var(--fbm-ds-text-scale));
}

.fbm-ds-standalone-setup {
    text-align: left;
    margin-bottom: 20px;
}

.fbm-ds-standalone-setup .form-group {
    margin-bottom: 14px;
}

.fbm-ds-standalone-setup label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.fbm-ds-standalone-select {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
}

.fbm-ds-required-pa {
    color: #c0392b;
    margin-left: 2px;
}

.fbm-ds-standalone-contact-hint,
.fbm-ds-standalone-contact-empty {
    margin: 8px 0 0;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.fbm-ds-stopwatch-container .fbm-ds-cancel-row {
    margin-top: calc(12px * var(--fbm-ds-text-scale, 1));
    padding-top: calc(14px * var(--fbm-ds-text-scale, 1));
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.fbm-ds-stopwatch-container button.fbm-ds-cancel-timer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    min-height: 0;
    width: auto;
    max-width: 100%;
    border: none !important;
    outline: none;
    box-shadow: none !important;
    background: transparent !important;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #6c757d;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transform: none;
}

.fbm-ds-stopwatch-container button.fbm-ds-cancel-timer-btn i {
    font-size: 12px;
    opacity: 0.85;
}

.fbm-ds-stopwatch-container button.fbm-ds-cancel-timer-btn:hover:not(:disabled),
.fbm-ds-stopwatch-container button.fbm-ds-cancel-timer-btn:focus-visible {
    color: #c0392b;
    text-decoration: underline;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none;
}

.fbm-ds-stopwatch-container button.fbm-ds-cancel-timer-btn:focus-visible {
    outline: 2px solid rgba(108, 117, 125, 0.35) !important;
    outline-offset: 3px;
    border-radius: 4px;
}

.fbm-ds-stopwatch-container button.fbm-ds-cancel-timer-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    text-decoration: none;
}

.fbm-ds-stopwatch-container .fbm-ds-cancel-hint {
    margin: calc(10px * var(--fbm-ds-text-scale, 1)) 0 0;
    font-size: calc(0.8125rem * var(--fbm-ds-text-scale, 1));
    color: #6b7280;
    line-height: 1.45;
}

.fbm-ds-stopwatch-header {
    margin-bottom: 20px;
}

.fbm-ds-stopwatch-title {
    margin: 0;
    font-size: calc(1.5rem * var(--fbm-ds-text-scale, 1));
    font-weight: 600;
    color: #333;
}

.fbm-ds-stopwatch-display {
    margin: 30px 0;
}

.fbm-ds-time-display {
    font-size: calc(4rem * var(--fbm-ds-text-scale, 1));
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 15px;
}

.fbm-ds-status {
    font-size: calc(0.875rem * var(--fbm-ds-text-scale, 1));
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.fbm-ds-status-running {
    color: #27ae60;
    font-weight: 600;
}

.fbm-ds-status-stopped {
    color: #95a5a6;
}

.fbm-ds-stopwatch-controls {
    margin: 30px 0;
}

.fbm-ds-btn {
    padding: calc(12px * var(--fbm-ds-text-scale, 1)) calc(24px * var(--fbm-ds-text-scale, 1));
    font-size: calc(0.9375rem * var(--fbm-ds-text-scale, 1));
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.fbm-ds-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.fbm-ds-btn-icon {
    font-size: 1em;
    width: 1.1em;
    text-align: center;
}

.fbm-ds-btn-text {
    white-space: nowrap;
}

.fbm-ds-btn-start,
.fbm-ds-btn-resume {
    background: #27ae60;
    color: #fff;
}

.fbm-ds-btn-start:hover:not(:disabled),
.fbm-ds-btn-resume:hover:not(:disabled) {
    background: #229954;
}

.fbm-ds-btn-pause {
    background: #f39c12;
    color: #fff;
}

.fbm-ds-btn-pause:hover:not(:disabled) {
    background: #e67e22;
}

.fbm-ds-btn-stop {
    background: #e74c3c;
    color: #fff;
}

.fbm-ds-btn-stop:hover:not(:disabled) {
    background: #c0392b;
}

.fbm-ds-btn-stop:disabled,
.fbm-ds-btn-stop.fbm-ds-btn-disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.fbm-ds-stopwatch-container--preview .fbm-ds-btn {
    cursor: not-allowed;
    opacity: 0.65;
}
.fbm-ds-stopwatch-container--preview .fbm-ds-time-display {
    color: #868e96;
}
.fbm-ds-stopwatch-container--preview .fbm-ds-status-stopped {
    color: #868e96;
}

.fbm-ds-status-paused {
    color: #f39c12;
    font-weight: 600;
}

/* Legacy: Unicode-Icons falls Font Awesome nicht geladen */
.fbm-ds-icon {
    font-size: 1em;
}

.fbm-ds-stopwatch-info {
    margin-top: calc(16px * var(--fbm-ds-text-scale, 1));
    margin-bottom: calc(4px * var(--fbm-ds-text-scale, 1));
    padding: calc(15px * var(--fbm-ds-text-scale, 1));
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: calc(0.875rem * var(--fbm-ds-text-scale, 1));
}

.fbm-ds-start-time {
    margin: 0;
    color: #666;
}

.fbm-ds-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.fbm-ds-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.fbm-ds-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.fbm-ds-message.fbm-ds-time-window-hint {
    background: #e7f1ff;
    color: #004085;
    border: 1px solid #b8daff;
    display: block;
}

/* Slide-to-start (mobil) */
.fbm-ds-slide-start {
    display: none;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.fbm-ds-slide-start-track {
    position: relative;
    height: 52px;
    border-radius: 26px;
    background: linear-gradient(90deg, rgba(39, 174, 96, 0.18) 0%, rgba(39, 174, 96, 0.08) 100%);
    border: 1px solid rgba(39, 174, 96, 0.35);
    overflow: hidden;
}

.fbm-ds-slide-start-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 56px 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: #1e6f43;
    letter-spacing: 0.02em;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.fbm-ds-slide-start-thumb {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #27ae60;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 0.25s ease, background 0.2s ease;
    transform: translateX(0);
    -webkit-tap-highlight-color: transparent;
}

.fbm-ds-slide-start-thumb:active {
    cursor: grabbing;
    background: #229954;
}

.fbm-ds-slide-start.is-disabled .fbm-ds-slide-start-track {
    background: #eef1f4;
    border-color: #d5dbe3;
}

.fbm-ds-slide-start.is-disabled .fbm-ds-slide-start-label {
    color: #8a939e;
}

.fbm-ds-slide-start.is-disabled .fbm-ds-slide-start-thumb {
    background: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
}

.fbm-ds-slide-start.is-completing .fbm-ds-slide-start-thumb {
    background: #229954;
}

.fbm-ds-slide-start.is-hidden {
    display: none !important;
}

/* Dark Mode (Cirkle / inklusionet Web) */
html[data-theme="dark-mode"] .fbm-ds-stopwatch-container {
    background: transparent;
    color: #e3e8ef;
    box-shadow: none;
}

html[data-theme="dark-mode"] .fbm-ds-stopwatch-title {
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-time-display {
    color: #f0f3f7;
}

html[data-theme="dark-mode"] .fbm-ds-status-stopped {
    color: #9aa3af;
}

html[data-theme="dark-mode"] .fbm-ds-stopwatch-info {
    background: #1f2329;
    border: 1px solid #3a404c;
    color: #d1d5db;
}

html[data-theme="dark-mode"] .fbm-ds-start-time {
    color: #bfc6d1;
}

html[data-theme="dark-mode"] .fbm-ds-message.fbm-ds-time-window-hint {
    background: #2b3038;
    color: #c4cad4;
    border-color: #3a404c;
}

html[data-theme="dark-mode"] .fbm-ds-message.success {
    background: #1e3a2e;
    color: #b8e6c8;
    border-color: #2d6a4a;
}

html[data-theme="dark-mode"] .fbm-ds-message.error {
    background: #3a2226;
    color: #f5b8c0;
    border-color: #6d3a42;
}

html[data-theme="dark-mode"] .fbm-ds-stopwatch-container .fbm-ds-cancel-row {
    border-top-color: #3a404c;
}

html[data-theme="dark-mode"] .fbm-ds-stopwatch-container button.fbm-ds-cancel-timer-btn {
    color: #9aa3af;
}

html[data-theme="dark-mode"] .fbm-ds-stopwatch-container button.fbm-ds-cancel-timer-btn:hover:not(:disabled),
html[data-theme="dark-mode"] .fbm-ds-stopwatch-container button.fbm-ds-cancel-timer-btn:focus-visible {
    color: #f87171;
}

html[data-theme="dark-mode"] .fbm-ds-stopwatch-container .fbm-ds-cancel-hint {
    color: #b0b8c4;
}

html[data-theme="dark-mode"] .fbm-ds-slide-start-track {
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.22) 0%, rgba(40, 167, 69, 0.08) 100%);
    border-color: rgba(72, 187, 99, 0.45);
}

html[data-theme="dark-mode"] .fbm-ds-slide-start-label {
    color: #b8e6c8;
}

html[data-theme="dark-mode"] .fbm-ds-slide-start.is-disabled .fbm-ds-slide-start-track {
    background: #2b3038;
    border-color: #3a404c;
}

html[data-theme="dark-mode"] .fbm-ds-slide-start.is-disabled .fbm-ds-slide-start-label {
    color: #7a828e;
}

/* Standalone-Setup (Typ, Kontakt, Assistenz) */
html[data-theme="dark-mode"] .fbm-ds-standalone-setup label,
html[data-theme="dark-mode"] .fbm-ds-standalone-contact label {
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-standalone-setup .fbm-ds-required-pa {
    color: #f87171;
}

html[data-theme="dark-mode"] .fbm-ds-standalone-select,
html[data-theme="dark-mode"] .fbm-ds-standalone-contact-select {
    color-scheme: dark;
    background: #252a33;
    border-color: #3a404c;
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-standalone-select:focus,
html[data-theme="dark-mode"] .fbm-ds-standalone-contact-select:focus {
    border-color: var(--ink-user-accent, #9aa3af);
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink-user-accent, #9aa3af) 28%, transparent);
}

html[data-theme="dark-mode"] .fbm-ds-standalone-select option,
html[data-theme="dark-mode"] .fbm-ds-standalone-contact-select option {
    background: #252a33;
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-standalone-contact-hint,
html[data-theme="dark-mode"] .fbm-ds-standalone-contact-empty {
    color: #9aa3af;
}

html[data-theme="dark-mode"] .fbm-ds-status-running {
    color: #6ee7a0;
}

html[data-theme="dark-mode"] .fbm-ds-status-paused {
    color: #fbbf77;
}

html[data-theme="dark-mode"] .fbm-ds-stopwatch-info strong {
    color: #e3e8ef;
}

/* Modals (Abschluss, Pause) */
html[data-theme="dark-mode"] .fbm-ds-modal-container {
    background-color: #242526;
    color: #e3e8ef;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark-mode"] .fbm-ds-modal-header,
html[data-theme="dark-mode"] .fbm-ds-modal-footer {
    border-color: #3a404c;
}

html[data-theme="dark-mode"] .fbm-ds-modal-title,
html[data-theme="dark-mode"] .fbm-ds-modal-body {
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-modal-close {
    color: #bfc6d1;
}

html[data-theme="dark-mode"] .fbm-ds-modal-close:hover {
    background: #2b3038;
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-modal-timer-info {
    background: #2b3038;
    border-color: #3a404c;
    color: #c4cad4;
}

html[data-theme="dark-mode"] .fbm-ds-label {
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-label .fbm-ds-optional {
    color: #9aa3af;
}

html[data-theme="dark-mode"] .fbm-ds-textarea,
html[data-theme="dark-mode"] .fbm-ds-input,
html[data-theme="dark-mode"] .fbm-ds-file-input {
    color-scheme: dark;
    background: #252a33;
    border-color: #3a404c;
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-textarea:focus,
html[data-theme="dark-mode"] .fbm-ds-input:focus {
    border-color: var(--ink-user-accent, #9aa3af);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink-user-accent, #9aa3af) 28%, transparent);
}

html[data-theme="dark-mode"] .fbm-ds-description,
html[data-theme="dark-mode"] .fbm-ds-description-small {
    color: #9aa3af;
}

html[data-theme="dark-mode"] .fbm-ds-checkbox-label,
html[data-theme="dark-mode"] .fbm-ds-radio-label {
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-attachment-item {
    background: #252a33;
    border-color: #3a404c;
}

html[data-theme="dark-mode"] .fbm-ds-attachment-item-name {
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-taetigkeiten-table th,
html[data-theme="dark-mode"] .fbm-ds-taetigkeiten-table td {
    border-color: #3a404c;
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-taetigkeiten-table th {
    background: #2b3038;
}

html[data-theme="dark-mode"] .fbm-ds-label-small {
    color: #bfc6d1;
}

html[data-theme="dark-mode"] .fbm-ds-modal-container .fbm-ds-btn-secondary {
    background: #252a33;
    color: #e3e8ef;
    border-color: #3a404c;
}

html[data-theme="dark-mode"] .fbm-ds-modal-container .fbm-ds-btn-secondary:hover {
    background: #2b3038;
}

html[data-theme="dark-mode"] .fbm-ds-completion-modal-footer .fbm-ds-btn-discard {
    color: #f87171;
    border-color: #6d3a42;
    background: transparent;
}

html[data-theme="dark-mode"] .fbm-ds-completion-modal-footer .fbm-ds-btn-discard:hover:not(:disabled) {
    background: #3a2226;
    color: #fca5a5;
    border-color: #8b3a44;
}

/* Tracking-Liste */
html[data-theme="dark-mode"] .fbm-ds-tracking-list-title {
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-no-tracking {
    color: #9aa3af;
}

html[data-theme="dark-mode"] .fbm-ds-tracking-table {
    background: #242526;
    border-color: #3a404c;
}

html[data-theme="dark-mode"] .fbm-ds-tracking-table thead {
    background: #2b3038;
}

html[data-theme="dark-mode"] .fbm-ds-tracking-table th,
html[data-theme="dark-mode"] .fbm-ds-tracking-table td {
    color: #e3e8ef;
    border-color: #3a404c;
}

html[data-theme="dark-mode"] .fbm-ds-tracking-table tbody tr:hover {
    background: #2b3038;
}

/* Toaster-Notification (viewport-zentriert, wie Honorarnoten/Kalender) */
#fbm-toaster-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

.fbm-toaster {
    min-width: 300px;
    max-width: min(500px, calc(100vw - 40px));
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 14px;
    line-height: 1.5;
}

.fbm-toaster-show {
    opacity: 1;
    transform: scale(1);
}

.fbm-toaster-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.fbm-toaster-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.fbm-toaster-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.fbm-toaster-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.fbm-toaster-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.fbm-toaster-success .fbm-toaster-icon {
    color: #28a745;
}

.fbm-toaster-success .fbm-toaster-icon::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.fbm-toaster-error .fbm-toaster-icon {
    color: #dc3545;
}

.fbm-toaster-error .fbm-toaster-icon::before {
    content: '\f00d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.fbm-toaster-info .fbm-toaster-icon {
    color: #17a2b8;
}

.fbm-toaster-info .fbm-toaster-icon::before {
    content: '\f05a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.fbm-toaster-message {
    flex: 1;
    font-weight: 500;
}

.fbm-toaster-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fbm-toaster-close:hover {
    opacity: 1;
}

html[data-theme="dark-mode"] .fbm-toaster-success {
    background: #1e3a2e;
    color: #7dd3a0;
    border-color: #28a745;
}

html[data-theme="dark-mode"] .fbm-toaster-error {
    background: #3a2020;
    color: #f5a0a0;
    border-color: #dc3545;
}

html[data-theme="dark-mode"] .fbm-toaster-info {
    background: #2b3038;
    color: #c4cad4;
    border-color: #3a404c;
}

/* Legacy-Klasse (Abwärtskompatibilität) */
.fbm-ds-toaster {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 300px;
    max-width: min(500px, calc(100vw - 40px));
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000000;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fbm-ds-toaster-slide-in 0.3s ease-out;
    font-size: 14px;
    line-height: 1.5;
}

.fbm-ds-toaster.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.fbm-ds-toaster.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.fbm-ds-toaster.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.fbm-ds-toaster-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.fbm-ds-toaster-message {
    flex: 1;
}

.fbm-ds-toaster-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fbm-ds-toaster-close:hover {
    opacity: 1;
}

@keyframes fbm-ds-toaster-slide-in {
    from {
        transform: translate(-50%, -50%) scale(0.92);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes fbm-ds-toaster-slide-out {
    from {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    to {
        transform: translate(-50%, -50%) scale(0.92);
        opacity: 0;
    }
}

.fbm-ds-toaster.closing {
    animation: fbm-ds-toaster-slide-out 0.3s ease-in forwards;
}

/* Tracking-Liste */
.fbm-ds-tracking-list-container {
    margin: 20px 0;
}

.fbm-ds-tracking-list-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.fbm-ds-no-tracking {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    color: #666;
    text-align: center;
}

.fbm-ds-tracking-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.fbm-ds-tracking-table thead {
    background: #2c3e50;
    color: #fff;
}

.fbm-ds-tracking-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.fbm-ds-tracking-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.fbm-ds-tracking-table tbody tr:hover {
    background: #f8f9fa;
}

.fbm-ds-tracking-table tbody tr.running {
    background: #fff3cd;
}

.fbm-ds-running {
    color: #27ae60;
    font-weight: 600;
}

.fbm-ds-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.fbm-ds-status-badge.fbm-ds-status-running {
    background: #d4edda;
    color: #155724;
}

.fbm-ds-status-badge.fbm-ds-status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

/* Responsive */
@media (max-width: 768px) {
    .fbm-ds-stopwatch-container {
        padding: 20px;
        margin: 10px;
    }
    
    .fbm-ds-time-display {
        font-size: 48px;
    }
    
    .fbm-ds-btn {
        padding: 12px 30px;
        font-size: 16px;
    }

    .fbm-ds-stopwatch-controls .fbm-ds-btn-start:not(.fbm-ds-btn-resume) {
        display: none !important;
    }

    .fbm-ds-slide-start:not(.is-hidden) {
        display: block;
    }
    
    .fbm-ds-tracking-table {
        font-size: 14px;
    }
    
    .fbm-ds-tracking-table th,
    .fbm-ds-tracking-table td {
        padding: 8px;
    }
}

/* Modal Styles – Optik wie FBM Management Tool, eigene Klassen (fbm-ds-*) */
.fbm-ds-completion-snapshot-group {
    margin-top: 0.5rem;
}

.fbm-ds-completion-snapshot-hint {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.45;
}

html[data-theme="dark-mode"] .fbm-ds-completion-snapshot-hint {
    color: #9aa3af;
}

.fbm-ds-modal-overlay {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999999 !important;
    display: none;
}

.fbm-ds-modal-overlay.active {
    display: block !important;
}

.fbm-ds-modal-container {
    --fbm-ds-text-scale: var(--fbm-journal-text-scale, var(--cirkle-a11y-scale, 1));
    font-size: calc(1rem * var(--fbm-ds-text-scale));
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) scale(0.92);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000000 !important;
    transition: transform 0.25s ease;
}

.fbm-ds-modal-overlay.active .fbm-ds-modal-container {
    transform: translate(-50%, -50%) scale(1);
}

.fbm-ds-modal-header {
    position: relative;
    flex-shrink: 0;
    padding: 20px 30px;
    padding-right: 56px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fbm-ds-modal-title {
    margin: 0;
    color: #374151;
    font-size: 20px;
    font-weight: 600;
}

.fbm-ds-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.fbm-ds-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.fbm-ds-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 30px;
    color: #374151;
    line-height: 1.6;
}

.fbm-ds-modal-footer {
    flex-shrink: 0;
    padding: 20px 30px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fbm-ds-completion-modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.fbm-ds-completion-modal-footer__secondary {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.fbm-ds-completion-modal-footer__secondary .fbm-ds-btn {
    flex: 1 1 0;
    min-width: 0;
}

.fbm-ds-completion-modal-footer__primary {
    width: 100%;
}

.fbm-ds-completion-modal-footer__primary .fbm-ds-btn {
    width: 100%;
}

.fbm-ds-completion-modal-footer .fbm-ds-btn-discard {
    margin-left: 0;
    background: transparent;
    color: #c0392b;
    border: 1px solid #f1b0b7;
    box-shadow: none;
}

.fbm-ds-completion-modal-footer .fbm-ds-btn-discard:hover:not(:disabled) {
    background: #fff5f5;
    color: #a93226;
    border-color: #e74c3c;
    transform: none;
}

.fbm-ds-modal-timer-info {
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    font-size: 14px;
    color: #0c4a6e;
}
.fbm-ds-modal-timer-info .fbm-ds-modal-timer-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Modal-Buttons im FBM-Tool-Stil (wie Storno/Calendar) */
.fbm-ds-modal-container .fbm-ds-btn-primary {
    background: #2d5be3;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
}
.fbm-ds-modal-container .fbm-ds-btn-primary:hover {
    background: #1e4bb8;
}

html[data-theme="dark-mode"] .fbm-ds-modal-container .fbm-ds-btn-primary {
    background: var(--ink-user-accent, #4b5563);
    color: var(--ink-user-on-accent, #fff);
}

html[data-theme="dark-mode"] .fbm-ds-modal-container .fbm-ds-btn-primary:hover {
    background: var(--ink-user-accent-hover, #6b7280);
}

.fbm-ds-modal-container .fbm-ds-btn-secondary {
    background: #f0f0f1;
    color: #1d2327;
    border: 1px solid #c3c4c7;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}
.fbm-ds-modal-container .fbm-ds-btn-secondary:hover {
    background: #e0e0e0;
}

#fbm-ds-completion-form {
    padding: 25px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.fbm-ds-form-group {
    margin-bottom: 20px;
}

.fbm-ds-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.fbm-ds-label .fbm-ds-required {
    color: #e74c3c;
}

.fbm-ds-label .fbm-ds-optional {
    font-weight: normal;
    color: #6c757d;
    font-size: 0.9em;
}

.fbm-ds-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

#fbm-ds-completion-notes {
    height: 80px;
    min-height: 80px;
    max-height: 80px;
    resize: none;
}

.fbm-ds-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.fbm-ds-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.fbm-ds-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.fbm-ds-file-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.fbm-ds-description {
    margin-top: 5px;
    font-size: 13px;
    color: #6c757d;
}

.fbm-ds-attachment-list {
    margin-top: 10px;
}

.fbm-ds-attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 5px;
}

.fbm-ds-attachment-item-name {
    flex: 1;
    font-size: 14px;
}

.fbm-ds-attachment-item-remove {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.fbm-ds-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fbm-ds-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.fbm-ds-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fbm-ds-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.fbm-ds-radio {
    margin: 0;
    cursor: pointer;
}

.fbm-ds-taetigkeiten-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.fbm-ds-taetigkeiten-table th {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
}

.fbm-ds-taetigkeiten-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.fbm-ds-checkbox-label-center {
    justify-content: center;
    display: flex;
    align-items: center;
    margin: 0;
}

.fbm-ds-kilometer-row {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.fbm-ds-kilometer-col {
    flex: 1;
}

.fbm-ds-label-small {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 13px;
    color: #333;
}

.fbm-ds-description-small {
    margin-top: 3px;
    font-size: 12px;
    color: #6c757d;
}

.fbm-ds-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.fbm-ds-error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
}


.fbm-ds-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.fbm-ds-btn-secondary:hover {
    background: #5a6268;
}

.fbm-ds-btn-primary {
    background: #3498db;
    color: #fff;
}

.fbm-ds-btn-primary:hover {
    background: #2980b9;
}

@media (max-width: 768px) {
    .fbm-ds-modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
}

/* PA: Inline-Markierung (gleiche Klassen wie Kalender) */
.fbm-calendar-pa-quick-mark {
    margin-top: 8px;
}
.fbm-calendar-pa-quick-mark-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink-user-accent, #3498db);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.fbm-calendar-pa-quick-mark-panel {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #e2e6ee;
    border-radius: 10px;
    background: #f8f9fc;
}
.fbm-calendar-pa-quick-mark-title {
    margin: 0 0 6px;
    font-weight: 600;
    font-size: 0.92rem;
}
.fbm-calendar-pa-quick-mark-hint,
.fbm-calendar-pa-quick-mark-limit,
.fbm-calendar-pa-quick-mark-empty {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: #5b6472;
    line-height: 1.45;
}
.fbm-calendar-pa-quick-mark-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}
.fbm-calendar-pa-quick-mark-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e8ebf2;
}
.fbm-calendar-pa-quick-mark-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fbm-calendar-pa-quick-mark-add {
    flex-shrink: 0;
    padding: 6px 10px;
    border: 1px solid var(--ink-user-accent, #3498db);
    border-radius: 8px;
    background: #fff;
    color: var(--ink-user-accent, #3498db);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
.fbm-calendar-pa-quick-mark-add:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
html[data-theme="dark-mode"] .fbm-ds-standalone-setup .fbm-calendar-pa-quick-mark-panel,
html:not([data-theme="light-mode"]) .fbm-ds-standalone-setup .fbm-calendar-pa-quick-mark-panel {
    background: #252a33;
    border-color: #3a404c;
    color: #e3e8ef;
}
html[data-theme="dark-mode"] .fbm-ds-standalone-setup .fbm-calendar-pa-quick-mark-hint,
html[data-theme="dark-mode"] .fbm-ds-standalone-setup .fbm-calendar-pa-quick-mark-limit,
html[data-theme="dark-mode"] .fbm-ds-standalone-setup .fbm-calendar-pa-quick-mark-empty,
html:not([data-theme="light-mode"]) .fbm-ds-standalone-setup .fbm-calendar-pa-quick-mark-hint,
html:not([data-theme="light-mode"]) .fbm-ds-standalone-setup .fbm-calendar-pa-quick-mark-limit,
html:not([data-theme="light-mode"]) .fbm-ds-standalone-setup .fbm-calendar-pa-quick-mark-empty {
    color: #b0b3b8;
}
html[data-theme="dark-mode"] .fbm-ds-standalone-setup .fbm-calendar-pa-quick-mark-add,
html:not([data-theme="light-mode"]) .fbm-ds-standalone-setup .fbm-calendar-pa-quick-mark-add {
    background: #1e2229;
    color: var(--ink-user-accent, #e3e8ef);
    border-color: #3a404c;
}

.fbm-ds-session-panel {
    max-width: 600px;
    margin: calc(16px * var(--fbm-ds-text-scale, 1)) auto 24px;
    padding: 0 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fbm-ds-session-panel[hidden] {
    display: none !important;
}

.fbm-ds-session-eval-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    padding: 16px 18px;
}

.fbm-ds-session-eval-card[hidden] {
    display: none !important;
}

.fbm-ds-session-eval-card__title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.fbm-ds-session-eval-card__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.fbm-ds-session-eval-card__stat {
    background: #f8fafc;
    border: 1px solid #e9eef3;
    border-radius: 10px;
    padding: 12px 14px;
}

.fbm-ds-session-eval-card__stat dt {
    margin: 0 0 6px;
    font-size: calc(0.75rem * var(--fbm-ds-text-scale, 1));
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.fbm-ds-session-eval-card__stat dd {
    margin: 0;
    font-size: calc(1.25rem * var(--fbm-ds-text-scale, 1));
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #1e293b;
}

.fbm-ds-session-accordion {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.fbm-ds-session-accordion__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: calc(14px * var(--fbm-ds-text-scale, 1)) calc(16px * var(--fbm-ds-text-scale, 1));
    border: 0;
    background: #fff;
    color: #333;
    font-size: calc(0.9375rem * var(--fbm-ds-text-scale, 1));
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.fbm-ds-session-accordion__trigger:hover,
.fbm-ds-session-accordion__trigger:focus {
    background: #f8fafc;
    outline: none;
}

.fbm-ds-session-accordion__trigger:focus-visible {
    outline: 2px solid var(--ink-user-accent, rgb(92, 106, 196));
    outline-offset: -2px;
}

.fbm-ds-session-accordion__label {
    flex: 1;
}

.fbm-ds-session-accordion__count {
    font-size: calc(0.8125rem * var(--fbm-ds-text-scale, 1));
    font-weight: 500;
    color: #64748b;
}

.fbm-ds-session-accordion__icon {
    color: #64748b;
    transition: transform 0.2s ease;
}

.fbm-ds-session-accordion.is-open .fbm-ds-session-accordion__icon {
    transform: rotate(180deg);
}

.fbm-ds-session-accordion__panel {
    border-top: 1px solid #eef1f4;
}

.fbm-ds-session-accordion__panel[hidden] {
    display: none !important;
}

.fbm-ds-session-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.fbm-ds-session-history-item {
    display: flex;
    align-items: center;
    gap: calc(14px * var(--fbm-ds-text-scale, 1));
    padding: calc(14px * var(--fbm-ds-text-scale, 1)) calc(16px * var(--fbm-ds-text-scale, 1));
    border-bottom: 1px solid #eef1f4;
}

.fbm-ds-session-history-item:last-child {
    border-bottom: none;
}

.fbm-ds-session-history-icon {
    flex: 0 0 calc(36px * var(--fbm-ds-text-scale, 1));
    width: calc(36px * var(--fbm-ds-text-scale, 1));
    height: calc(36px * var(--fbm-ds-text-scale, 1));
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: calc(1rem * var(--fbm-ds-text-scale, 1));
}

.fbm-ds-session-history-item--work .fbm-ds-session-history-icon {
    background: #e8eaed;
    color: #4b5563;
}

.fbm-ds-session-history-item--pause .fbm-ds-session-history-icon {
    background: #eceef1;
    color: #6b7280;
}

.fbm-ds-session-history-main {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.fbm-ds-session-history-range {
    display: block;
    font-size: calc(1rem * var(--fbm-ds-text-scale, 1));
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.fbm-ds-session-history-meta {
    display: block;
    margin-top: 2px;
    font-size: calc(0.8125rem * var(--fbm-ds-text-scale, 1));
    color: #6b7280;
}

html[data-theme="dark-mode"] .fbm-ds-session-eval-card,
html:not([data-theme="light-mode"]) .fbm-ds-session-eval-card,
html[data-theme="dark-mode"] .fbm-ds-session-accordion,
html:not([data-theme="light-mode"]) .fbm-ds-session-accordion {
    background: #1e2229;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark-mode"] .fbm-ds-session-eval-card__title,
html:not([data-theme="light-mode"]) .fbm-ds-session-eval-card__title,
html[data-theme="dark-mode"] .fbm-ds-session-accordion__trigger,
html:not([data-theme="light-mode"]) .fbm-ds-session-accordion__trigger {
    color: #e3e8ef;
}

html[data-theme="dark-mode"] .fbm-ds-session-accordion__trigger,
html:not([data-theme="light-mode"]) .fbm-ds-session-accordion__trigger {
    background: #1e2229;
}

html[data-theme="dark-mode"] .fbm-ds-session-accordion__trigger:hover,
html:not([data-theme="light-mode"]) .fbm-ds-session-accordion__trigger:hover,
html[data-theme="dark-mode"] .fbm-ds-session-accordion__trigger:focus,
html:not([data-theme="light-mode"]) .fbm-ds-session-accordion__trigger:focus {
    background: #252a33;
}

html[data-theme="dark-mode"] .fbm-ds-session-eval-card__stat,
html:not([data-theme="light-mode"]) .fbm-ds-session-eval-card__stat {
    background: #252a33;
    border-color: #3a404c;
}

html[data-theme="dark-mode"] .fbm-ds-session-eval-card__stat dt,
html:not([data-theme="light-mode"]) .fbm-ds-session-eval-card__stat dt {
    color: #94a3b8;
}

html[data-theme="dark-mode"] .fbm-ds-session-eval-card__stat dd,
html:not([data-theme="light-mode"]) .fbm-ds-session-eval-card__stat dd {
    color: #f1f5f9;
}

html[data-theme="dark-mode"] .fbm-ds-session-accordion__panel,
html:not([data-theme="light-mode"]) .fbm-ds-session-accordion__panel {
    border-top-color: #2f3642;
}

html[data-theme="dark-mode"] .fbm-ds-session-history-item,
html:not([data-theme="light-mode"]) .fbm-ds-session-history-item {
    border-bottom-color: #2f3642;
}

html[data-theme="dark-mode"] .fbm-ds-session-history-range,
html:not([data-theme="light-mode"]) .fbm-ds-session-history-range {
    color: #f3f4f6;
}

html[data-theme="dark-mode"] .fbm-ds-session-history-meta,
html:not([data-theme="light-mode"]) .fbm-ds-session-history-meta {
    color: #9ca3af;
}

html[data-theme="dark-mode"] .fbm-ds-session-history-item--work .fbm-ds-session-history-icon,
html:not([data-theme="light-mode"]) .fbm-ds-session-history-item--work .fbm-ds-session-history-icon {
    background: #2b3038;
    color: #c4cad4;
}

html[data-theme="dark-mode"] .fbm-ds-session-history-item--pause .fbm-ds-session-history-icon,
html:not([data-theme="light-mode"]) .fbm-ds-session-history-item--pause .fbm-ds-session-history-icon {
    background: #252a33;
    color: #9aa3af;
}

html[data-theme="dark-mode"] #fbm-ds-completion-modal.fbm-ds-completion-modal--slim .fbm-ds-modal-body,
html:not([data-theme="light-mode"]) #fbm-ds-completion-modal.fbm-ds-completion-modal--slim .fbm-ds-modal-body {
    padding-bottom: 0.5rem;
}

#fbm-ds-completion-standard-fields .fbm-ds-standalone-select {
    width: 100%;
    max-width: 100%;
}

