/* flowDeck⁺ legacy styles extracted from templates/index.html */

body {
            background-color: #f4f6f9;
            font-family: Arial, sans-serif;
            transition: 0.3s;
            overflow-y: scroll;
            scrollbar-gutter: stable;
        }

        .generate-progress-line {
            position: relative;
            height: 3px;
            overflow: hidden;
            border-radius: 999px;
            background: #dee2e6;
        }

        .generate-progress-line::after {
            content: "";
            position: absolute;
            inset: 0;
            width: 34%;
            border-radius: inherit;
            background: transparent;
            transform: translateX(-120%);
        }

        .generate-progress-line.is-loading::after {
            background: linear-gradient(90deg, #0d6efd, #73a7ff);
            animation: generate-progress-sweep 1s ease-in-out infinite;
        }

        @keyframes generate-progress-sweep {
            0% {
                transform: translateX(-120%);
            }

            100% {
                transform: translateX(320%);
            }
        }

        body.darkmode .generate-progress-line {
            background: #334155;
        }

        /* DARKMODE */


body.darkmode {

    background: #0f172a;
    color: #f8fafc;

}

/* MAIN */

body.darkmode .main {

    background: #0f172a;

}

/* KACHELN */

body.darkmode .card-custom {

    background: #172036;
    border: 1px solid #243045;

}

/* INPUTS */

body.darkmode .form-control,
body.darkmode .form-select {

    background: #243045;
    border: 1px solid #334155;
    color: white;

}

/* PLACEHOLDER */

body.darkmode .form-control::placeholder {

    color: #94a3b8;

}

/* LABELS */

body.darkmode label {

    color: #e2e8f0;

}

/* INPUT GROUP */

body.darkmode .input-group-text {

    background: #243045;
    border: 1px solid #334155;
    color: white;

}

/* DATEPICKER */

body.darkmode input[type="date"] {

    background: #243045;
    color: white;

}

/* SELECT */

body.darkmode .form-select {

    color: white;

}

/* CHECKBOXEN */

body.darkmode .form-check-input {

    background-color: #243045;
    border-color: #475569;

}

/* VORSCHAU */

body.darkmode .preview-box {

    background: #172036;
    border: 1px solid #243045;

}

/* A4 */

body.darkmode .a4-page {

    background: white;
    color: black;


}

body.darkmode .a4-page,
body.darkmode .a4-page * {

    color: black !important;

}

/* BUTTONS */

body.darkmode .btn-outline-primary {

    border-color: #3b82f6;
    color: #3b82f6;

}

/* SIDEBAR */

body.darkmode .sidebar {

    background: #0b1220;

}

/* MENU */

body.darkmode .menu-item {

    color: #e2e8f0;

}

body.darkmode .menu-item:hover {

    background: rgba(255,255,255,0.06);

}

/* ACTIVE */

body.darkmode .menu-item.active {

    background: #1d4ed8;
    color: white;

}

/* KOSTENSTELLE */

body.darkmode .btn-check + label {

    background: #243045 !important;
    border-color: #334155 !important;
    color: white !important;

}

/* AKTIV */

body.darkmode .btn-check:checked + label {

    background: #1d4fd850 !important;
    border-color: #1d4ed8 !important;
    color: white !important;

}

/* KLEINER TEXT */

body.darkmode .btn-check + label small {

    color: #cbd5e1 !important;

}

        /* SIDEBAR */

        .sidebar {
            width: 240px;
            height: 100vh;
            background-color: #0d2d6c;
            position: fixed;
            left: 0;
            top: 0;
            color: white;
            padding: 20px;
            display: flex;
            flex-direction: column;

        }

        .sidebar-dashboard {
            margin-top: auto;
            margin-bottom: 1rem;
            padding-top: 1rem;
            padding-bottom: 1rem;
            border-top: 1px solid rgba(255,255,255,.15);
            border-bottom: 1px solid rgba(255,255,255,.15);

        }

        .sidebar-section-title {
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: rgba(255,255,255,.7);
            margin-bottom: 1rem;

}

        .logo {
            display: flex;
            align-items: center;
            margin-bottom: 40px;
        }

        .logo-box {
            width: 42px;
            height: 42px;
            border-radius: 12px;
            background: transparent;
            filter: drop-shadow(0 0 7px rgba(147, 197, 253, .32));

            display: flex;
            align-items: center;
            justify-content: center;

            margin-right: 12px;
            overflow: hidden;
        }

        .logo-box img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
            border-radius: 12px;
        }

        .logo-text {
            font-size: 18px;
            font-weight: 650;
            letter-spacing: 0;
            line-height: 1.05;
        }

        .logo-subtitle {
            font-size: 11px;
            color: rgba(255,255,255,0.7);
            margin-top: -2px;
        }

        .menu-item {
            padding: 14px 16px;
            border-radius: 10px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: 0.2s;
            color: white;
            text-decoration: none;
            display: block;
        }

        .menu-item:hover {
            background-color: rgba(255,255,255,0.1);
        }

        .menu-item.active {
            background-color: #1d4ed8;
        }

        .menu-item i {
            margin-right: 10px;
        }

       .sidebar-footer {
            margin-top: 1rem;
            font-size: 13px;
            color: rgba(255,255,255,0.7);

}

        /* MAIN */

        .main {
            margin-left: 240px;
            padding: 0 25px 25px;
        }

        .app-header {
            height: 78px;
            margin: 0 -25px 24px;
            padding: 14px 28px;
            background: rgba(255,255,255,.92);
            border-bottom: 1px solid #e5e7eb;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 24px;
            flex-wrap: nowrap;
            position: sticky;
            top: 0;
            z-index: 20;
            backdrop-filter: blur(12px);
        }

        body.darkmode .app-header {
            background: rgba(15,23,42,.92);
            border-bottom-color: #243045;
        }

        .app-header-search {
            position: relative;
            width: auto;
            display: inline-flex;
            align-items: center;
        }

        .header-icon-button {
            width: 44px;
            height: 44px;
            border: 0;
            border-radius: 12px;
            background: transparent;
            color: #111827;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 21px;
            transition: background .2s, color .2s;
        }

        .header-icon-button:hover,
        .header-icon-button:focus {
            background: #eef4ff;
            color: #2563eb;
            outline: none;
        }

        body.darkmode .header-icon-button {
            color: #f8fafc;
        }

        body.darkmode .header-icon-button:hover,
        body.darkmode .header-icon-button:focus {
            background: #1e293b;
            color: #93c5fd;
        }

        .app-header-search-popover {
            position: absolute;
            top: calc(100% + 10px);
            right: 0;
            width: min(420px, calc(100vw - 32px));
            opacity: 0;
            transform: translateY(-6px);
            pointer-events: none;
            transition: opacity .18s, transform .18s;
            z-index: 50;
        }

        .app-header-search.is-open .app-header-search-popover {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .app-header-search .input-group {
            min-height: 48px;
            padding: 4px;
            background: #fff;
            border: 1px solid #dbe4f0;
            box-shadow: 0 12px 30px rgba(15,23,42,.08);
            border-radius: 16px;
            transition: border-color .2s, box-shadow .2s;
        }

        .app-header-search .input-group:focus-within {
            border-color: #7aa7ff;
            box-shadow: 0 14px 34px rgba(37,99,235,.16);
        }

        .app-header-search .input-group-text,
        .app-header-search .form-control {
            border: 0;
            background: transparent;
        }

        .app-header-search .form-control {
            min-height: 38px;
            box-shadow: none;
        }

        body.darkmode .app-header-search .input-group {
            background: #172036;
            border-color: #334155;
            box-shadow: 0 12px 30px rgba(0,0,0,.18);
        }

        body.darkmode .app-header-search .input-group-text,
        body.darkmode .app-header-search .form-control {
            background: transparent;
            border: 0;
            color: #f8fafc;
        }

        .app-header-shortcut {
            align-self: center;
            min-height: 30px;
            margin-right: 2px;
            padding: 4px 10px;
            background: #eef2f7 !important;
            border-radius: 10px !important;
            color: #475569;
            font-weight: 700;
            font-size: 12px;
        }

        body.darkmode .app-header-shortcut {
            background: #243045 !important;
            color: #cbd5e1;
        }

        .app-header-search-close {
            width: 38px;
            min-height: 38px;
            padding: 0;
            border-radius: 10px !important;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
            cursor: pointer;
        }

        .modern-search {
            min-height: 46px;
            padding: 3px;
            background: #fff;
            border: 1px solid #dbe4f0;
            border-radius: 14px;
            box-shadow: 0 8px 22px rgba(15,23,42,.06);
            transition: border-color .2s, box-shadow .2s;
        }

        .modern-search:focus-within {
            border-color: #7aa7ff;
            box-shadow: 0 12px 28px rgba(37,99,235,.13);
        }

        .modern-search .input-group-text,
        .modern-search .form-control {
            border: 0;
            background: transparent;
            box-shadow: none;
        }

        .modern-search .form-control {
            min-height: 38px;
        }

        body.darkmode .modern-search {
            background: #172036;
            border-color: #334155;
        }

        body.darkmode .modern-search .input-group-text,
        body.darkmode .modern-search .form-control {
            background: transparent;
            border: 0;
            color: #f8fafc;
        }

        .notification-button {
            border: 0;
            background: transparent;
            position: relative;
            font-size: 23px;
            color: #111827;
        }

        body.darkmode .notification-button {
            color: #f8fafc;
        }

        .notification-badge {
            position: absolute;
            top: 5px;
            right: 5px;
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            border-radius: 999px;
            background: #ef4444;
            color: #fff;
            font-size: 11px;
            font-weight: 700;
            line-height: 18px;
        }

        .header-user-toggle {
            min-width: 220px;
            border: 0;
            background: transparent;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 6px 8px;
            border-radius: 12px;
            color: #111827;
            text-align: left;
        }

        .header-user-toggle:hover {
            background: #f1f5f9;
        }

        body.darkmode .header-user-toggle {
            color: #f8fafc;
        }

        body.darkmode .header-user-toggle:hover {
            background: #172036;
        }

        .header-user-photo {
            width: 46px;
            height: 46px;
            border-radius: 999px;
            overflow: hidden;
            background: #e5e7eb;
            flex: 0 0 46px;
        }

        .header-user-photo img {
            width: 200%;
            height: 200%;
            object-fit: cover;
            object-position: center top;
            transform: translateX(-25%);
            display: none;
        }

        .header-user-photo.has-image img {
            display: block;
        }

        .header-user-initials {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            color: #1d4ed8;
        }

        .header-user-photo.has-image .header-user-initials {
            display: none;
        }

        .header-user-name {
            font-weight: 800;
            line-height: 1.1;
        }

        .header-user-role {
            font-size: 13px;
            color: #64748b;
            margin-top: 2px;
        }

        .home-hero {
            margin-bottom: 16px;
            max-width: 980px;
        }

        #homePage {
            font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
            letter-spacing: 0;
            height: calc(100dvh - 127px);
            min-height: 0;
            overflow: hidden;
            flex-direction: column;
            padding-bottom: 0;
            scrollbar-gutter: stable;
        }

        #homePage .card-custom {
            border: 1px solid #e4eaf2;
            border-radius: 10px;
            box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
        }

        .home-hero h1 {
            margin: 0;
            font-size: clamp(20px, 1.7vw, 24px);
            font-family: var(--fd-font-main) !important;
            font-weight: 700;
            color: #111827;
            line-height: 1.2;
        }

        body.darkmode .home-hero h1 {
            color: #f8fafc;
        }

        .home-hero p {
            margin: 4px 0 0;
            color: #536173;
            font-size: 14px;
            line-height: 1.45;
        }

        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(6, minmax(140px, 1fr));
            gap: 12px;
            margin-bottom: 12px;
        }

        .dashboard-card {
            min-height: 76px;
            height: 100%;
            padding: 13px 15px;
            display: flex;
            align-items: center;
            gap: 11px;
            margin-bottom: 0;
            min-width: 0;
        }

        .dashboard-card > div:last-child {
            min-width: 0;
        }

        .dashboard-icon {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 19px;
            flex: 0 0 38px;
        }

        .dashboard-icon.blue { background: #e8f1ff; color: #2563eb; }
        .dashboard-icon.red { background: #fee2e2; color: #dc2626; }
        .dashboard-icon.green { background: #dcfce7; color: #16a34a; }
        .dashboard-icon.yellow { background: #fef3c7; color: #d97706; }
        .dashboard-icon.purple { background: #ede9fe; color: #6d28d9; }
        .dashboard-icon.teal { background: #ccfbf1; color: #0f766e; }

        .dashboard-label {
            color: #334155;
            font-family: var(--fd-font-main);
            font-weight: 750;
            font-size: 13px;
            line-height: 1.2;
            overflow-wrap: anywhere;
            word-break: normal;
            hyphens: auto;
        }

        .dashboard-value {
            font-size: 23px;
            line-height: 1.1;
            font-weight: 800;
            color: #111827;
        }

        body.darkmode .dashboard-label,
        body.darkmode .dashboard-value {
            color: #f8fafc;
        }

        .home-quickbar {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            align-items: center;
            gap: 0;
            margin: 0 0 12px;
            padding: 0;
            border: 1px solid #e5edf7;
            border-radius: 10px;
            background: #ffffff;
            box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
            overflow: hidden;
            flex: 0 0 auto;
        }

        .home-quick-action {
            height: 48px;
            min-width: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 0 12px;
            border: 0;
            border-right: 1px solid #e5edf7;
            border-radius: 0;
            background: #fff;
            color: #1f365f;
            font-size: 12px;
            font-weight: 800;
            line-height: 1.12;
            text-align: center;
            transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
        }

        .home-quick-action:first-child {
            border-radius: 12px 0 0 12px;
        }

        .home-quick-action:last-child {
            border-right: 0;
            border-radius: 0 12px 12px 0;
        }

        .home-quick-action:hover,
        .home-quick-action:focus {
            border-color: #2563eb;
            background: #eff6ff;
            color: #1d4ed8;
            transform: none;
            outline: none;
        }

        .home-quick-action.is-primary {
            border-color: #e5edf7;
            background: #fff;
            color: #1f365f;
        }

        .home-quick-action.is-primary:hover,
        .home-quick-action.is-primary:focus {
            background: #1d4ed8;
            color: #fff;
        }

        .home-quick-action i {
            font-size: 14px;
            line-height: 1;
        }

        .home-quick-action sup {
            margin-left: 1px;
            position: relative;
            top: -0.35em;
            font-size: .72em;
            line-height: 0;
        }

        .global-search-home-card {
            margin-bottom: 18px;
            padding: 18px;
        }

        .global-search-clear-btn {
            width: 36px;
            min-width: 36px;
            height: 36px;
            padding: 0 !important;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .global-search-results {
            display: grid;
            gap: 12px;
        }

        .global-search-section {
            display: grid;
            gap: 8px;
        }

        .global-search-section-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            color: #475569;
            font-size: 13px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: .02em;
        }

        .global-search-section-count {
            color: #64748b;
            font-size: 12px;
            font-weight: 700;
            text-transform: none;
            letter-spacing: 0;
        }

        .global-search-item-list {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 8px;
        }

        .global-search-item {
            width: 100%;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            background: #f8fafc;
            color: #111827;
            padding: 10px;
            display: grid;
            grid-template-columns: 34px minmax(0, 1fr);
            gap: 10px;
            text-align: left;
            transition: border-color .15s ease, background .15s ease, transform .15s ease;
        }

        .global-search-item:hover,
        .global-search-item:focus {
            border-color: #2563eb;
            background: #eff6ff;
            transform: none;
            outline: none;
        }

        .global-search-type-icon {
            width: 34px;
            height: 34px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #e8f1ff;
            color: #2563eb;
            font-size: 17px;
        }

        .global-search-item-title {
            font-weight: 800;
            line-height: 1.25;
            overflow-wrap: anywhere;
        }

        .global-search-item-meta {
            margin-top: 3px;
            color: #64748b;
            font-size: 13px;
            line-height: 1.35;
            overflow-wrap: anywhere;
        }

        .global-search-empty {
            border: 1px dashed #cbd5e1;
            border-radius: 8px;
            color: #64748b;
            padding: 14px;
            background: #f8fafc;
        }

        body.darkmode .global-search-section-head {
            color: #cbd5e1;
        }

        body.darkmode .global-search-section-count,
        body.darkmode .global-search-item-meta,
        body.darkmode .global-search-empty {
            color: #94a3b8;
        }

        body.darkmode .global-search-item,
        body.darkmode .global-search-empty {
            border-color: #334155;
            background: #111827;
            color: #f8fafc;
        }

        body.darkmode .global-search-item:hover,
        body.darkmode .global-search-item:focus {
            border-color: #60a5fa;
            background: #172033;
        }

        .home-section-card {
            padding: 14px;
            margin-bottom: 0;
            height: auto;
            min-height: 0;
            display: flex;
            flex-direction: column;
        }

        .home-scroll-area {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 4px;
            scrollbar-gutter: stable;
        }

        .home-main-grid {
            display: grid;
            grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.05fr) minmax(620px, 2.2fr);
            grid-template-rows: repeat(2, minmax(0, 1fr));
            gap: 16px;
            margin-bottom: 0;
            align-items: stretch;
            flex: 1 1 auto;
            min-height: 0;
            overflow: hidden;
            max-width: 1560px;
        }

        .home-main-grid .home-section-card {
            min-height: 0;
            height: 100%;
        }

        .home-card-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            min-height: 30px;
            margin-bottom: 12px;
        }

        .home-card-title {
            margin: 0;
            color: #0f172a;
            font-family: var(--fd-font-main);
            font-size: 16px;
            font-weight: 700;
            letter-spacing: 0;
            line-height: 1.15;
        }

        .home-main-grid > div:nth-child(1) {
            grid-column: 1;
            grid-row: 1;
        }

        .home-main-grid > div:nth-child(2) {
            grid-column: 2;
            grid-row: 1 / span 2;
        }

        .home-main-grid > div:nth-child(3) {
            grid-column: 3;
            grid-row: 1 / span 2;
        }

        .home-main-grid > div:nth-child(4) {
            grid-column: 1;
            grid-row: 2;
        }

        .home-main-grid .missing-documents-list,
        .home-main-grid .recent-workbook-list {
            max-height: none;
        }

        .home-main-grid h5:not(.home-card-title):not(.home-widget-title) {
            font-size: 16px;
            letter-spacing: 0;
        }

        .home-main-grid > div {
            min-height: 0;
        }

        .missing-documents-list {
            display: grid;
            gap: 10px;
            flex: 1 1 auto;
            min-height: 0;
            align-content: start;
            overflow: auto;
            padding-right: 4px;
        }

        .missing-document-group {
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            padding: 10px;
            background: rgba(255,255,255,.76);
        }

        .missing-document-group-head {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
            font-weight: 800;
        }

        .missing-document-item {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            padding: 5px 0;
            color: #475569;
            font-size: 13px;
        }

        .home-today-list {
            display: grid;
            gap: 8px;
            flex: 1 1 auto;
            min-height: 0;
            overflow: auto;
            padding-right: 4px;
        }

        .home-today-event {
            display: grid;
            grid-template-columns: 58px minmax(0, 1fr) 34px;
            gap: 10px;
            align-items: center;
            padding: 9px 10px;
            border: 1px solid #e5e7eb;
            border-radius: 9px;
            background: #fff;
        }

        .home-today-time {
            min-height: 30px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-left: 3px solid #2563eb;
            border-radius: 7px;
            background: #eff6ff;
            color: #1d4ed8;
            font-size: 12px;
            font-weight: 800;
        }

        .home-today-title {
            color: #111827;
            font-size: 13px;
            font-weight: 800;
            line-height: 1.25;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .home-today-meta {
            margin-top: 2px;
            color: #64748b;
            font-size: 12px;
            line-height: 1.25;
        }

        .home-today-initial {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #eef2ff;
            color: #4338ca;
            font-size: 11px;
            font-weight: 800;
        }

        .missing-document-row {
            display: grid;
            grid-template-columns: 34px minmax(0, 1fr);
            gap: 10px;
            padding: 10px;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            background: rgba(255,255,255,.76);
        }

        .missing-document-icon {
            width: 34px;
            height: 34px;
            border-radius: 12px;
            background: #fff7ed;
            color: #c2410c;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .missing-document-person,
        .missing-document-name {
            min-width: 0;
            overflow-wrap: anywhere;
        }

        .missing-document-person {
            font-family: var(--fd-font-main);
            font-weight: 700;
            color: #111827;
        }

        .missing-document-name {
            color: #475569;
            font-size: 13px;
        }

        .workbook-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
            gap: 18px;
        }

        .workbook-card {
            position: relative;
            overflow: visible;
            border-left: 4px solid #2563eb;
            min-width: 420px;
            min-height: 166px;
            max-height: none;
            display: flex;
            flex-direction: column;
        }

        .workbook-card.is-highlighted {
            box-shadow: 0 0 0 3px rgba(37, 99, 235, .22), 0 14px 30px rgba(15, 23, 42, .12);
        }

        .workbook-card.is-active {
            border-left-color: #22c55e;
        }

        .workbook-card.is-pending {
            border-left-color: #f59e0b;
        }

        .workbook-card.is-ended {
            border-left-color: #ef4444;
        }

        .workbook-card.is-completed {
            border-left-color: #64748b;
            background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
            border-style: dashed;
            opacity: .86;
        }

        .workbook-card.is-completed .workbook-status {
            font-weight: 700;
        }

        .workbook-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: #f1f5f9;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #1d4ed8;
            font-size: 21px;
            flex: 0 0 auto;
        }

        .workbook-status {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-weight: 800;
            font-size: 13px;
            white-space: nowrap;
        }

        .workbook-pills {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .workbook-status-dot {
            width: 9px;
            height: 9px;
            border-radius: 50%;
            background: #64748b;
        }

        .workbook-status.success .workbook-status-dot { background: #22c55e; }
        .workbook-status.warning .workbook-status-dot { background: #f59e0b; }
        .workbook-status.danger .workbook-status-dot { background: #ef4444; }
        .workbook-status.secondary .workbook-status-dot { background: #64748b; }

        .workbook-meta {
            display: flex;
            gap: 18px;
            flex-wrap: wrap;
            color: #475569;
            font-size: 13px;
        }

        .workbook-actions {
            display: grid;
            grid-template-columns: repeat(4, minmax(42px, 1fr));
            gap: 8px;
            margin-top: auto;
        }

        .workbook-actions .btn {
            font-weight: 400;
            min-height: 36px;
            min-width: 0;
            padding-left: 8px !important;
            padding-right: 8px !important;
            white-space: nowrap;
        }

        .workbook-actions .btn:not(.w-100),
        .workbook-actions .btn.card-action-btn.btn-sm:not(.w-100) {
            min-width: 0;
        }

        .workbook-actions .btn i {
            margin: 0 !important;
            font-size: 15px;
        }

        .transfer-dashboard {
            display: grid;
            gap: 14px;
        }

        .transfer-hero {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            padding: 20px 22px;
            border-left: 4px solid #2563eb;
        }

        .transfer-eyebrow {
            color: #2563eb;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0;
        }

        .transfer-hero h3,
        .transfer-panel h4 {
            margin: 0;
            color: #020617;
            font-weight: 760;
            letter-spacing: 0;
        }

        .transfer-hero p {
            margin: 4px 0 0;
            color: #64748b;
            font-size: 13px;
            font-weight: 500;
        }

        .transfer-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .transfer-status {
            padding: 0 4px;
        }

        .transfer-stats-root {
            display: grid;
            gap: 14px;
        }

        .transfer-kpi-grid {
            display: grid;
            grid-template-columns: repeat(6, minmax(150px, 1fr));
            gap: 12px;
        }

        .transfer-kpi-card {
            display: flex;
            gap: 12px;
            align-items: center;
            min-height: 104px;
            padding: 16px;
            background: #fff;
            border: 1px solid #dbe7f5;
            border-radius: 10px;
            box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
        }

        .transfer-kpi-icon {
            width: 42px;
            height: 42px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #eff6ff;
            color: #2563eb;
            font-size: 20px;
            flex: 0 0 auto;
        }

        .transfer-kpi-value {
            color: #020617;
            font-size: 24px;
            font-weight: 850;
            line-height: 1.1;
        }

        .transfer-kpi-label {
            color: #334155;
            font-size: 13px;
            font-weight: 750;
            margin-top: 3px;
        }

        .transfer-kpi-detail {
            color: #64748b;
            font-size: 12px;
            margin-top: 2px;
        }

        .transfer-layout {
            display: grid;
            grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
            gap: 14px;
        }

        .transfer-panel {
            padding: 18px;
        }

        .transfer-panel-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 14px;
        }

        .transfer-project-list,
        .transfer-rgs-list,
        .transfer-kpb-list {
            display: grid;
            gap: 10px;
        }

        .transfer-project-row {
            display: grid;
            grid-template-columns: minmax(140px, 0.9fr) minmax(0, 1.4fr);
            gap: 14px;
            align-items: center;
            padding: 12px;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            background: #fbfdff;
        }

        .transfer-project-label {
            color: #0f172a;
            font-weight: 750;
            font-size: 13px;
        }

        .transfer-project-bars {
            display: grid;
            gap: 8px;
        }

        .transfer-bar-line {
            display: grid;
            grid-template-columns: 42px minmax(0, 1fr) 52px;
            gap: 9px;
            align-items: center;
            color: #475569;
            font-size: 12px;
            font-weight: 750;
        }

        .transfer-bar,
        .transfer-progress {
            height: 9px;
            overflow: hidden;
            border-radius: 999px;
            background: #e5edf8;
        }

        .transfer-bar i,
        .transfer-progress i {
            display: block;
            height: 100%;
            border-radius: inherit;
            background: linear-gradient(90deg, #2563eb, #60a5fa);
        }

        .transfer-bar-line.is-m4m .transfer-bar i {
            background: linear-gradient(90deg, #7c3aed, #a78bfa);
        }

        .transfer-rgs-card {
            padding: 13px;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            background: #fbfdff;
        }

        .transfer-rgs-head {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
        }

        .transfer-rgs-name {
            color: #0f172a;
            font-weight: 850;
        }

        .transfer-rgs-head strong {
            color: #2563eb;
            font-size: 20px;
        }

        .transfer-rgs-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 8px;
            margin-top: 12px;
            color: #64748b;
            font-size: 12px;
        }

        .transfer-rgs-grid span,
        .transfer-rgs-m4m {
            padding: 8px;
            border-radius: 8px;
            background: #f1f5f9;
        }

        .transfer-rgs-grid strong,
        .transfer-rgs-m4m strong {
            display: block;
            color: #0f172a;
            font-size: 14px;
        }

        .transfer-rgs-m4m {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            margin-top: 10px;
            color: #7c3aed;
            font-weight: 800;
        }

        .transfer-kpb-list {
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        }

        .transfer-kpb-card {
            display: grid;
            gap: 13px;
            padding: 14px;
            border: 1px solid #dbe6f5;
            border-radius: 12px;
            background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        }

        .transfer-kpb-card-head {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .transfer-kpb-avatar {
            width: 36px;
            height: 36px;
            flex: 0 0 36px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 11px;
            color: #1d4ed8;
            background: #eff6ff;
            font-size: 12px;
            font-weight: 800;
        }

        .transfer-kpb-name {
            color: #0f172a;
            font-size: 15px;
            font-weight: 760;
            line-height: 1.15;
        }

        .transfer-kpb-metrics {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
        }

        .transfer-kpb-metric {
            min-height: 74px;
            padding: 10px;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            background: #ffffff;
        }

        .transfer-kpb-metric span {
            display: block;
            color: #64748b;
            font-size: 11px;
            font-weight: 700;
            line-height: 1.2;
        }

        .transfer-kpb-metric strong {
            display: block;
            margin-top: 5px;
            color: #0f172a;
            font-size: 20px;
            font-weight: 820;
            line-height: 1;
        }

        .transfer-kpb-metric small {
            display: block;
            margin-top: 5px;
            color: #64748b;
            font-size: 11px;
            font-weight: 650;
        }

        .transfer-warnings {
            display: grid;
            gap: 8px;
        }

        .transfer-warnings div {
            padding: 10px 12px;
            border: 1px solid #fed7aa;
            border-radius: 10px;
            background: #fff7ed;
            color: #9a3412;
            font-weight: 700;
        }

        @media (max-width: 1400px) {
            .transfer-kpi-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        @media (max-width: 980px) {
            .transfer-hero,
            .transfer-layout {
                grid-template-columns: 1fr;
            }

            .transfer-hero {
                display: grid;
            }

            .transfer-actions {
                justify-content: stretch;
            }

            .transfer-actions .btn {
                flex: 1 1 auto;
            }

            .transfer-kpi-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 640px) {
            .workpaper-tabs {
                flex-direction: column;
            }

            .transfer-kpi-grid,
            .transfer-project-row,
            .transfer-kpb-list,
            .transfer-kpb-metrics {
                grid-template-columns: 1fr;
            }
        }

        .transfer-report-sheet {
            display: grid;
            gap: 17px;
            padding: 20px 22px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background: #ffffff;
            box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
            color: #0f172a;
        }

        .transfer-report-topline {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 18px;
            padding-bottom: 13px;
            border-bottom: 1px solid #cbd5e1;
        }

        .transfer-report-title span {
            display: block;
            color: #2563eb;
            font-size: 11px;
            font-weight: 720;
        }

        .transfer-report-title h3 {
            margin: 3px 0 0;
            color: #020617;
            font-size: 22px;
            font-weight: 760;
            line-height: 1.18;
        }

        .transfer-report-title p,
        .transfer-report-section-head p {
            margin: 4px 0 0;
            color: #64748b;
            font-size: 13px;
            font-weight: 500;
        }

        .transfer-report-meta {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            flex-wrap: wrap;
        }

        .transfer-report-chip {
            display: inline-flex;
            min-height: 30px;
            align-items: center;
            padding: 5px 10px;
            border: 1px solid #dbeafe;
            border-radius: 8px;
            background: #eff6ff;
            color: #1d4ed8;
            font-size: 11px;
            font-weight: 650;
            white-space: nowrap;
        }

        .transfer-report-summary {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
            gap: 10px;
        }

        .transfer-report-stat {
            min-height: 86px;
            padding: 12px 13px;
            border: 1px solid #d8e2ef;
            border-left: 3px solid #2563eb;
            border-radius: 8px;
            background: #f8fbff;
        }

        .transfer-report-stat.is-women {
            border-left-color: #0ea5e9;
            background: #f0f9ff;
        }

        .transfer-report-stat.is-men {
            border-left-color: #64748b;
            background: #f8fafc;
        }

        .transfer-report-stat.is-access {
            border-left-color: #16a34a;
            background: #f0fdf4;
        }

        .transfer-report-stat.is-futura,
        .transfer-report-stat.is-active {
            border-left-color: #f59e0b;
            background: #fffbeb;
        }

        .transfer-report-stat.is-quote {
            border-left-color: #22c55e;
            background: #f0fdf4;
        }

        .transfer-report-stat.is-abort {
            border-left-color: #a855f7;
            background: #faf5ff;
        }

        .transfer-report-stat span {
            display: block;
            color: #334155;
            font-size: 12px;
            font-weight: 650;
            line-height: 1.25;
        }

        .transfer-report-stat strong {
            display: block;
            margin-top: 6px;
            color: #020617;
            font-size: 22px;
            font-weight: 760;
            line-height: 1.1;
        }

        .transfer-report-stat small {
            display: block;
            margin-top: 4px;
            color: #64748b;
            font-size: 12px;
            font-weight: 500;
        }

        .transfer-report-section {
            display: grid;
            gap: 10px;
        }

        .transfer-report-section-head {
            display: flex;
            justify-content: space-between;
            gap: 14px;
        }

        .transfer-report-section-head h4 {
            margin: 0;
            color: #020617;
            font-size: 17px;
            font-weight: 760;
            line-height: 1.15;
        }

        .transfer-report-scroll {
            max-width: 100%;
            overflow-x: auto;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background: #ffffff;
        }

        .transfer-report-table {
            width: 100%;
            min-width: 680px;
            border-collapse: collapse;
            color: #0f172a;
            font-size: 13px;
        }

        .transfer-report-table th,
        .transfer-report-table td {
            padding: 8px 9px;
            border: 1px solid #cbd5e1;
            text-align: right;
            vertical-align: middle;
            white-space: nowrap;
        }

        .transfer-report-table thead th {
            background: #f1f5f9;
            color: #334155;
            font-size: 12px;
            font-weight: 720;
        }

        .transfer-report-table tbody th {
            width: 36%;
            text-align: left;
            color: #111827;
            font-weight: 650;
            white-space: normal;
        }

        .transfer-report-table tbody tr:nth-child(even) th {
            background: #f8fafc;
        }

        .transfer-report-table tbody tr:nth-child(even) td {
            filter: saturate(0.96);
        }

        .transfer-report-table .transfer-col-futura {
            background: #f8fafc;
        }

        .transfer-report-table .transfer-col-m4m {
            background: #fff3e7;
        }

        .transfer-report-table .transfer-col-target {
            background: #dcfce7;
            color: #166534;
            font-weight: 720;
        }

        .transfer-report-table .transfer-col-women {
            background: #e0f2fe;
            color: #075985;
            font-weight: 680;
        }

        .transfer-report-table .transfer-col-abort {
            background: #f3e8ff;
            color: #6b21a8;
            font-weight: 680;
        }

        .transfer-rgs-report-table {
            min-width: 1220px;
            font-size: 12px;
        }

        .transfer-rgs-report-table tbody th {
            width: auto;
            min-width: 116px;
        }

        .transfer-rgs-report-table .transfer-group-futura {
            background: #fef3c7;
            color: #92400e;
        }

        .transfer-rgs-report-table .transfer-group-m4m {
            background: #ffedd5;
            color: #9a3412;
        }

        .transfer-kpb-report-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
            gap: 10px;
        }

        .transfer-kpb-report-card {
            overflow: hidden;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background: #ffffff;
        }

        .transfer-kpb-report-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            min-height: 42px;
            padding: 9px 11px;
            background: #f1f5f9;
            border-bottom: 1px solid #dbe4ef;
        }

        .transfer-kpb-report-head strong {
            min-width: 0;
            color: #020617;
            font-size: 14px;
            font-weight: 850;
            line-height: 1.15;
        }

        .transfer-kpb-report-head span {
            flex: 0 0 auto;
            min-width: 46px;
            padding: 3px 7px;
            border-radius: 7px;
            background: #ffffff;
            color: #1d4ed8;
            text-align: center;
            font-size: 12px;
            font-weight: 820;
        }

        .transfer-kpb-report-card.is-high .transfer-kpb-report-head {
            background: #dcfce7;
        }

        .transfer-kpb-report-card.is-good .transfer-kpb-report-head {
            background: #dbeafe;
        }

        .transfer-kpb-report-card.is-mid .transfer-kpb-report-head {
            background: #fef3c7;
        }

        .transfer-kpb-report-card.is-low .transfer-kpb-report-head {
            background: #fee2e2;
        }

        .transfer-kpb-report-body {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0;
        }

        .transfer-kpb-report-line {
            min-height: 64px;
            padding: 9px 10px;
            border-right: 1px solid #e2e8f0;
            border-bottom: 1px solid #e2e8f0;
            background: #ffffff;
        }

        .transfer-kpb-report-line:nth-child(2n) {
            border-right: 0;
        }

        .transfer-kpb-report-line:nth-last-child(-n + 2) {
            border-bottom: 0;
        }

        .transfer-kpb-report-line span {
            display: block;
            color: #64748b;
            font-size: 11px;
            font-weight: 760;
            line-height: 1.2;
        }

        .transfer-kpb-report-line strong {
            display: block;
            margin-top: 4px;
            color: #020617;
            font-size: 19px;
            font-weight: 850;
            line-height: 1.05;
        }

        .transfer-kpb-report-line small {
            display: block;
            margin-top: 4px;
            color: #64748b;
            font-size: 11px;
            font-weight: 650;
            line-height: 1.15;
        }

        @media (max-width: 760px) {
            .transfer-report-topline {
                display: grid;
            }

            .transfer-report-meta {
                justify-content: flex-start;
            }

            .transfer-report-sheet {
                padding: 14px;
            }
        }

        @media (max-width: 560px) {
            .transfer-report-summary,
            .transfer-kpb-report-grid,
            .transfer-kpb-report-body {
                grid-template-columns: 1fr;
            }

            .transfer-kpb-report-line,
            .transfer-kpb-report-line:nth-child(2n),
            .transfer-kpb-report-line:nth-last-child(-n + 2) {
                border-right: 0;
                border-bottom: 1px solid #e2e8f0;
            }

            .transfer-kpb-report-line:last-child {
                border-bottom: 0;
            }
        }

        @media (max-width: 560px) {
            .workbook-grid {
                grid-template-columns: minmax(0, 1fr);
            }

            .workbook-card {
                min-width: 0;
            }

            .workbook-actions {
                grid-template-columns: repeat(4, minmax(38px, 1fr));
            }
        }

        .workbook-more-menu {
            min-width: 190px;
            padding: 8px;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            box-shadow: 0 16px 36px rgba(15, 23, 42, .14);
        }

        .workbook-more-menu .dropdown-item {
            border-radius: 8px;
            font-size: 13px;
            padding: 8px 10px;
        }

        .workbook-title {
            font-size: 18px;
            font-weight: 700;
            line-height: 1.2;
        }

        .template-library-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
            gap: 16px;
        }

        .template-card {
            min-height: 190px;
            min-width: 310px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            margin-bottom: 0;
        }

        .template-card-head {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            min-width: 0;
        }

        .template-icon {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            font-size: 22px;
        }

        .template-icon.word {
            background: #dbeafe;
            color: #1d4ed8;
        }

        .template-icon.excel {
            background: #dcfce7;
            color: #15803d;
        }

        .template-icon.text {
            background: #f1f5f9;
            color: #475569;
        }

        .template-title {
            font-weight: 800;
            line-height: 1.2;
            color: #111827;
        }

        .template-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: auto;
            color: #64748b;
            font-size: 13px;
        }

        .workbook-detail-modal {
            overflow: hidden;
            border: 1px solid rgba(148, 163, 184, .34);
            border-radius: 8px;
            box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
            background: #f8fafc;
        }

        .workbook-detail-modal-header {
            min-height: 64px;
            padding: 18px 20px;
            border-bottom: 1px solid #e2e8f0;
            background: #fff;
        }

        .workbook-detail-modal-header .modal-title {
            max-width: min(720px, 80vw);
            overflow: hidden;
            color: #0f172a;
            font-size: 18px;
            font-weight: 750;
            line-height: 1.25;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .workbook-detail-modal-body {
            padding: 16px;
            background: #f8fafc;
        }

        .workbook-detail-shell {
            display: grid;
            gap: 14px;
        }

        .workbook-overview-panel {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 10px;
        }

        .workbook-overview-item {
            min-width: 0;
            display: grid;
            grid-template-columns: 34px minmax(0, 1fr);
            align-items: center;
            gap: 10px;
            min-height: 72px;
            padding: 12px;
            border: 1px solid #dbe5f2;
            border-radius: 8px;
            background: #fff;
        }

        .workbook-overview-icon {
            width: 34px;
            height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            background: #eff6ff;
            color: #2563eb;
            font-size: 16px;
        }

        .workbook-overview-copy {
            min-width: 0;
        }

        .workbook-overview-label,
        .workbook-detail-label,
        .workbook-section-meta {
            color: #64748b;
            font-size: 12px;
            font-weight: 600;
            line-height: 1.25;
        }

        .workbook-overview-value {
            min-width: 0;
            margin-top: 4px;
            overflow: hidden;
            color: #111827;
            font-size: 13px;
            font-weight: 750;
            line-height: 1.25;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .workbook-detail-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 12px;
        }

        .workbook-detail-block {
            min-width: 0;
            border: 1px solid #dbe5f2;
            border-radius: 8px;
            padding: 14px;
            background: #fff;
        }

        .workbook-section-title {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: #0f172a;
            font-size: 13px;
            font-weight: 800;
            line-height: 1.25;
        }

        .workbook-section-title i {
            color: #2563eb;
            font-size: 15px;
        }

        .workbook-detail-list {
            display: grid;
            gap: 0;
            margin-top: 10px;
        }

        .workbook-documents-block {
            background: #fff;
        }

        .workbook-documents-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            margin-bottom: 12px;
        }

        .workbook-documents-actions {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 8px;
        }

        .workbook-documents-actions .btn {
            min-height: 36px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 750;
        }

        .workbook-document-list {
            display: grid;
            gap: 7px;
        }

        .workbook-document-row {
            min-width: 0;
            display: grid;
            grid-template-columns: 18px minmax(0, 1fr) auto 28px;
            align-items: center;
            gap: 10px;
            min-height: 44px;
            padding: 8px 10px;
            border: 1px solid #dbe5f2;
            border-radius: 8px;
            background: #f8fbff;
            color: #243047;
            font-size: 13px;
        }

        .workbook-document-row i {
            color: #2563eb;
        }

        .workbook-document-name {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-weight: 650;
        }

        .workbook-document-list.is-crm-document-pills .workbook-document-row {
            grid-template-columns: 18px 116px minmax(82px, auto) 28px;
        }

        .workbook-document-list.is-crm-document-pills .workbook-document-name {
            overflow: visible;
        }

        .workbook-document-type-pill {
            width: 108px;
            min-height: 24px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 3px 9px;
            border: 1px solid #bfdbfe;
            border-radius: 999px;
            background: #eff6ff;
            color: #1d4ed8;
            font-size: 11px;
            font-weight: 700;
            line-height: 1;
            white-space: nowrap;
        }

        .workbook-document-meta {
            color: #64748b;
            white-space: nowrap;
        }

        .workbook-document-open {
            width: 28px;
            height: 28px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            border: 1px solid #dbeafe;
            border-radius: 7px;
            background: #fff;
            color: #2563eb;
            text-decoration: none;
        }

        .workbook-document-open:hover,
        .workbook-document-open:focus-visible {
            background: #eff6ff;
            color: #1d4ed8;
        }

        .workbook-document-empty {
            padding: 14px;
            border: 1px dashed #cbd5e1;
            border-radius: 8px;
            color: #64748b;
            font-size: 13px;
            text-align: center;
        }

        .workbook-detail-row {
            display: grid;
            grid-template-columns: minmax(92px, .7fr) minmax(0, 1fr);
            gap: 12px;
            padding: 8px 0;
            border-bottom: 1px solid #e5e7eb;
            font-size: 13px;
        }

        .workbook-detail-row:last-child {
            border-bottom: 0;
        }

        .workbook-detail-value {
            min-width: 0;
            color: #111827;
            font-size: 13px;
            font-weight: 650;
            line-height: 1.35;
            overflow-wrap: anywhere;
        }

        .workbook-detail-empty {
            min-height: 64px;
            display: flex;
            align-items: center;
            color: #64748b;
            font-size: 13px;
        }

        @media (max-width: 1180px) {
            .workbook-overview-panel,
            .workbook-detail-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 720px) {
            .workbook-detail-modal-body {
                padding: 12px;
            }

            .workbook-overview-panel,
            .workbook-detail-grid {
                grid-template-columns: 1fr;
            }

            .workbook-documents-head {
                align-items: stretch;
                flex-direction: column;
            }

            .workbook-documents-actions {
                justify-content: stretch;
            }

            .workbook-documents-actions .btn {
                flex: 1 1 150px;
            }

            .workbook-document-row {
                grid-template-columns: 18px minmax(0, 1fr) 28px;
            }

            .workbook-document-meta {
                display: none;
            }
        }

        body.darkmode .workbook-detail-modal,
        body.darkmode .workbook-detail-modal-body {
            background: #0f172a;
        }

        body.darkmode .workbook-detail-modal {
            border-color: #334155;
            box-shadow: 0 24px 70px rgba(0, 0, 0, .46);
        }

        body.darkmode .workbook-detail-modal-header,
        body.darkmode .workbook-overview-item,
        body.darkmode .workbook-detail-block,
        body.darkmode .workbook-document-row,
        body.darkmode .workbook-document-open {
            border-color: #334155;
            background: #172036;
        }

        body.darkmode .workbook-detail-modal-header .modal-title,
        body.darkmode .workbook-overview-value,
        body.darkmode .workbook-section-title,
        body.darkmode .workbook-detail-value,
        body.darkmode .workbook-document-row {
            color: #f8fafc;
        }

        body.darkmode .workbook-overview-label,
        body.darkmode .workbook-detail-label,
        body.darkmode .workbook-section-meta,
        body.darkmode .workbook-detail-empty,
        body.darkmode .workbook-document-meta {
            color: #94a3b8;
        }

        body.darkmode .workbook-overview-icon {
            background: rgba(37, 99, 235, .16);
            color: #93c5fd;
        }

        .recent-row {
            display: grid;
            grid-template-columns: 32px minmax(0, 1fr) 24px;
            align-items: start;
            gap: 9px;
            padding: 9px 10px;
            border: 1px solid #e5e7eb;
            border-bottom: 0;
            min-width: 0;
        }

        .recent-row > div {
            min-width: 0;
        }

        .recent-row:first-child {
            border-radius: 10px 10px 0 0;
        }

        .recent-row:last-child {
            border-bottom: 1px solid #e5e7eb;
            border-radius: 0 0 10px 10px;
        }

        .recent-workbook-list {
            display: grid;
            gap: 0;
            flex: 1 1 auto;
            min-height: 0;
            align-content: start;
            overflow: auto;
        }

        .recent-meta {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
            margin-top: 3px;
        }

        .recent-title-line {
            display: flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
        }

        .recent-title-line .recent-name-link {
            min-width: 0;
            font-family: var(--fd-font-main);
        }

        .recent-title-line .badge {
            font-size: 10px;
            line-height: 1;
            padding: 3px 7px;
        }

        .recent-row .card-info {
            font-size: 11px;
            line-height: 1.25;
        }

        .recent-meta .workbook-status {
            font-size: 11px;
        }

        .recent-workbook-open {
            width: 24px;
            height: 24px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .recent-avatar {
            border-radius: 50%;
            background: #f1f5f9;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .recent-avatar {
            width: 30px;
            height: 30px;
            color: #475569;
            font-size: 13px;
            margin-top: 1px;
        }

        .recent-name-link {
            display: block;
            max-width: 100%;
            border: 0;
            background: transparent;
            padding: 0;
            color: #111827;
            font-family: var(--fd-font-main);
            font-weight: 400;
            font-size: 16px;
            line-height: 1.15;
            text-align: left;
        }

        .recent-name-link:hover {
            color: #1d4ed8;
            text-decoration: underline;
            text-underline-offset: 3px;
        }

        .calendar-card {
            min-height: 0;
            height: auto;
            background:
                linear-gradient(180deg, rgba(248, 251, 255, .92), #fff 38%),
                #fff;
            min-width: 0;
            box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
        }

        .home-calendar-card {
            padding: 14px;
            min-width: 0;
            overflow: hidden;
            background: #fbfdff;
        }

        .home-calendar-card .calendar-title-block {
            margin-bottom: 10px;
        }

        .home-calendar-card .calendar-controls {
            justify-content: flex-start;
            align-items: center;
            margin-bottom: 12px;
        }

        .home-calendar-card .calendar-today-btn {
            margin-left: 8px;
            margin-right: 10px;
            min-width: 72px;
            background: #fff !important;
            border: 1px solid #dbe3ee !important;
            box-shadow: 0 4px 12px rgba(15, 23, 42, .04);
            color: #1f2f46 !important;
        }

        .home-calendar-card #calendarSelectedDate {
            display: none;
        }

        .home-calendar-card #calendarMonthLabel {
            color: #1f2f46;
            font-size: 15px;
            font-weight: 800;
            margin-left: 4px;
        }

        .home-calendar-card .calendar-grid {
            width: 100%;
            max-width: 100%;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            grid-template-rows: 34px repeat(6, minmax(0, 1fr));
            border-radius: 10px;
            min-width: 0;
            flex: 1 1 auto;
            min-height: 0;
            background: #ffffff;
        }

        .home-calendar-card .calendar-weekday,
        .home-calendar-card .calendar-day {
            height: auto;
            min-width: 0;
            align-items: flex-start;
            justify-content: flex-start;
            padding: 9px;
            font-size: 12px;
            font-weight: 800;
        }

        .home-calendar-card .calendar-weekday {
            height: 34px;
            align-items: center;
            justify-content: center;
            padding: 0;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: .04em;
        }

        .home-calendar-card .calendar-day:nth-child(7n),
        .home-calendar-card .calendar-day:nth-child(7n + 6) {
            background: #fff7f1;
        }

        .home-calendar-card .calendar-day-number {
            width: 23px;
            height: 23px;
            border-radius: 8px;
        }

        .home-calendar-card .calendar-event-dot {
            display: none;
        }

        .calendar-day-events {
            width: 100%;
            display: grid;
            gap: 3px;
            margin-top: 4px;
            overflow: hidden;
        }

        .calendar-day-event-chip {
            min-width: 0;
            height: 16px;
            padding: 1px 5px;
            border-radius: 4px;
            background: #e8f1ff;
            color: #23456f;
            font-size: 10px;
            font-weight: 600;
            line-height: 14px;
            text-align: left;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            border-left: 2px solid #2563eb;
        }

        .calendar-day-event-chip:nth-child(2) {
            background: #f3eadf;
            border-left-color: #c08457;
        }

        .calendar-day-more {
            color: #64748b;
            font-size: 10px;
            font-weight: 700;
            line-height: 1;
        }

        .calendar-controls {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 12px;
            flex-wrap: wrap;
        }

        .calendar-control-btn {
            width: 34px;
            min-width: 34px;
            height: 34px;
            min-height: 34px;
            padding: 0 !important;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            border: 0 !important;
            background: transparent !important;
            color: #64748b !important;
        }

        .calendar-today-btn {
            width: auto;
            min-width: 132px;
            padding: 0 12px !important;
            border-radius: 8px !important;
            font-weight: 700;
            color: #475569 !important;
            background: #fff !important;
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            grid-template-rows: 34px repeat(6, 34px);
            gap: 0;
            padding: 0;
            border: 1px solid #e5edf7;
            border-radius: 12px;
            background: #fff;
            overflow: hidden;
            min-width: 0;
            flex: 0 0 auto;
        }

        .calendar-weekday,
        .calendar-day {
            min-height: 0;
            height: 34px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
        }

        .calendar-weekday {
            color: #64748b;
            font-weight: 700;
            background: #f8fafc;
            border-bottom: 1px solid #eef2f7;
        }

        .calendar-day {
            color: #334155;
            border: 0;
            border-right: 1px solid #f1f5f9;
            border-bottom: 1px solid #f1f5f9;
            background: transparent;
            transition: background .15s, color .15s, transform .15s;
            position: relative;
            padding: 0;
            border-radius: 0;
        }

        .calendar-day-number {
            width: 28px;
            height: 28px;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background .15s, color .15s, transform .15s, box-shadow .15s;
        }

        .calendar-day.is-muted {
            color: #cbd5e1;
        }

        .calendar-day:not(.is-muted):hover {
            color: #1d4ed8;
            background: #f8fbff;
        }

        .calendar-day:not(.is-muted):hover .calendar-day-number {
            background: transparent;
        }

        .calendar-day.is-today .calendar-day-number {
            background: #1d4ed8;
            color: #fff;
            font-weight: 800;
        }

        .calendar-day.is-selected .calendar-day-number {
            box-shadow: 0 0 0 2px #93c5fd;
            font-weight: 800;
        }

        .calendar-day.has-event .calendar-day-number {
            background: transparent;
            color: #334155;
            font-weight: 800;
        }

        .calendar-day.has-event:not(.is-muted):hover .calendar-day-number {
            background: transparent;
            color: #1d4ed8;
        }

        .calendar-day.is-today.has-event .calendar-day-number {
            background: #1d4ed8;
            color: #fff;
        }

        .calendar-event-dot {
            position: absolute;
            bottom: 5px;
            left: 50%;
            width: 18px;
            height: 2px;
            border-radius: 50%;
            background: #1d4ed8;
            transform: translateX(-50%);
        }

        .calendar-day.is-today .calendar-event-dot {
            background: #fff;
        }

        .outlook-sync-panel {
            margin-top: 12px;
            padding: 12px;
            border: 1px solid #e5edf7;
            border-radius: 16px;
            background: rgba(255,255,255,.72);
            overflow: visible;
            min-width: 0;
        }

        .calendar-title-block {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            min-width: 0;
            margin-bottom: 10px;
        }

        .calendar-title-actions {
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            min-width: 0;
        }

        .calendar-view-switch {
            display: inline-grid;
            grid-template-columns: repeat(3, minmax(58px, 1fr));
            gap: 4px;
            padding: 3px;
            border: 1px solid #dbe7f5;
            border-radius: 12px;
            background: #f8fafc;
        }

        .calendar-view-btn {
            min-width: 58px;
            min-height: 28px;
            padding: 0 10px !important;
            border-radius: 9px !important;
            font-size: 12px;
            font-weight: 700;
            line-height: 1;
            border: 0 !important;
            box-shadow: none !important;
        }

        .calendar-layout {
            display: flex;
            flex: 1 1 auto;
            min-height: 0;
        }

        .calendar-month-pane {
            min-width: 0;
            width: 100%;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        .calendar-day-pane {
            display: none;
        }

        .calendar-week-pane:not(.d-none),
        .calendar-day-pane:not(.d-none) {
            width: 100%;
            min-width: 0;
            display: flex !important;
            flex-direction: column;
            gap: 12px;
        }

        .calendar-week-grid {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 8px;
            min-width: 0;
        }

        .calendar-week-day {
            min-width: 0;
            min-height: 230px;
            padding: 10px;
            border: 1px solid #dbe7f5;
            border-radius: 12px;
            background: #fff;
            text-align: left;
            color: #0f172a;
            display: flex;
            flex-direction: column;
            gap: 10px;
            transition: border-color .15s, box-shadow .15s, transform .15s;
        }

        .calendar-week-day:hover {
            border-color: #93c5fd;
            box-shadow: 0 10px 22px rgba(37, 99, 235, .10);
        }

        .calendar-week-day.is-selected {
            border-color: #2563eb;
            box-shadow: inset 3px 0 0 #2563eb;
        }

        .calendar-week-day.is-today .calendar-week-day-head strong {
            background: #2563eb;
            color: #fff;
        }

        .calendar-week-day-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            color: #475569;
            font-size: 12px;
            font-weight: 700;
        }

        .calendar-week-day-head strong {
            width: 26px;
            height: 26px;
            border-radius: 9px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #0f172a;
        }

        .calendar-week-events {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .calendar-week-event {
            min-width: 0;
            display: grid;
            gap: 2px;
            padding: 7px 8px;
            border: 1px solid #dbeafe;
            border-left: 3px solid #2563eb;
            border-radius: 10px;
            background: #eff6ff;
        }

        .calendar-week-event-time {
            color: #64748b;
            font-size: 11px;
            font-weight: 700;
            line-height: 1.1;
        }

        .calendar-week-event-title {
            min-width: 0;
            color: #0f172a;
            font-size: 12px;
            font-weight: 700;
            line-height: 1.15;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .calendar-week-empty,
        .calendar-week-more {
            color: #64748b;
            font-size: 12px;
            line-height: 1.25;
        }

        .calendar-day-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 14px;
            border-bottom: 1px solid #e5edf7;
            background: #f8fafc;
        }

        .calendar-day-title {
            font-weight: 800;
            color: #0f172a;
            line-height: 1.2;
        }

        .calendar-day-subtitle {
            color: #64748b;
            font-size: 12px;
            line-height: 1.2;
        }

        .calendar-timeline {
            --slot-height: 18px;
            position: relative;
            height: calc(var(--slot-height) * 44);
            overflow-y: auto;
            overflow-x: hidden;
            background: #fff;
        }

        .calendar-slot {
            display: grid;
            grid-template-columns: 54px minmax(0, 1fr);
            min-height: var(--slot-height);
            border-bottom: 1px solid #f1f5f9;
            color: #94a3b8;
            font-size: 10px;
        }

        .calendar-slot.is-hour {
            border-bottom-color: #e2e8f0;
        }

        .calendar-slot-time {
            padding: 2px 8px 0 0;
            text-align: right;
            font-weight: 700;
        }

        .calendar-slot-line {
            border-left: 1px solid #e5edf7;
        }

        .calendar-slot.is-drop-target .calendar-slot-line {
            background: #eff6ff;
            box-shadow: inset 3px 0 0 #2563eb;
        }

        .calendar-timeline-events {
            position: absolute;
            inset: 0 8px 0 60px;
            pointer-events: none;
        }

        .calendar-timeline-event {
            position: absolute;
            left: 0;
            right: 0;
            min-height: 22px;
            border: 1px solid #bfdbfe;
            border-left: 4px solid #2563eb;
            border-radius: 8px;
            background: linear-gradient(135deg, #eff6ff, #fff);
            color: #0f172a;
            padding: 4px 8px;
            overflow: hidden;
            cursor: grab;
            pointer-events: auto;
            box-shadow: 0 6px 14px rgba(37, 99, 235, .10);
        }

        .calendar-timeline-event:active {
            cursor: grabbing;
        }

        .calendar-timeline-event.is-readonly {
            cursor: default;
            border-color: #e5e7eb;
            border-left-color: #94a3b8;
            background: #f8fafc;
        }

        .calendar-timeline-event.is-outlook {
            border-left-color: #0f766e;
            border-color: #99f6e4;
        }

        .calendar-timeline-event.is-birthday {
            border-left-color: #d97706;
            border-color: #fde68a;
            background: #fffbeb;
        }

        .calendar-timeline-event-title {
            font-size: 12px;
            font-weight: 800;
            line-height: 1.15;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .calendar-timeline-event-time {
            margin-top: 2px;
            font-size: 11px;
            color: #64748b;
            line-height: 1.1;
        }

        .calendar-empty-day {
            margin: 12px;
            border: 1px dashed #cbd5e1;
            border-radius: 12px;
            padding: 12px;
            color: #64748b;
            background: #f8fafc;
            font-size: 13px;
        }

        .outlook-status-pill {
            display: inline-flex;
            align-items: center;
            gap: 0;
            padding: 0;
            border-radius: 999px;
            background: transparent;
            color: #047857;
            border: 0;
            font-weight: 600;
            font-size: 12px;
        }

        .outlook-status-pill.error {
            background: transparent;
            color: #b91c1c;
        }

        .outlook-status-pill.neutral {
            background: transparent;
            color: #475569;
        }

        .outlook-status-dot {
            width: 9px;
            height: 9px;
            border-radius: 50%;
            background: #22c55e;
            box-shadow:
                0 0 0 3px rgba(34, 197, 94, .12),
                0 0 10px rgba(34, 197, 94, .45);
        }

        .outlook-status-pill.error .outlook-status-dot {
            background: #ef4444;
        }

        .outlook-status-pill.neutral .outlook-status-dot {
            background: #94a3b8;
        }

        .outlook-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            min-width: 0;
        }

        .outlook-actions .btn {
            width: 100%;
            min-width: 0;
            white-space: normal;
            overflow: visible;
            line-height: 1.15;
        }

        .home-calendar-card .outlook-sync-panel {
            margin-top: 10px;
            padding: 10px;
            border-radius: 12px;
        }

        .home-calendar-card .outlook-actions {
            gap: 8px;
        }

        .home-calendar-card .outlook-actions .btn {
            min-height: 38px;
            padding-top: 7px !important;
            padding-bottom: 7px !important;
        }

        .modal {
            z-index: 1085;
        }

        .modal-backdrop {
            z-index: 1080;
        }

        .outlook-status {
            min-height: 20px;
            font-size: 13px;
            color: #64748b;
        }

        .calendar-event-row {
            display: grid;
            grid-template-columns: 38px minmax(0, 1fr);
            gap: 12px;
            padding: 10px;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            background: #fff;
        }

        .calendar-event-source {
            display: inline-flex;
            width: 38px;
            height: 38px;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            background: #eff6ff;
            color: #1d4ed8;
        }

        .calendar-event-delete {
            margin-left: auto;
            color: #dc2626;
            border: 0;
            background: transparent;
            padding: 0;
        }

        .outlook-hidden-action {
            display: none !important;
        }

        .rss-card {
            flex: 0 0 auto;
            height: 118px;
            overflow: hidden;
            clear: both;
            margin-top: 14px !important;
            margin-bottom: 0;
        }

        .rss-ticker {
            position: relative;
            overflow: hidden;
            height: 46px;
            border: 1px solid #e5edf7;
            border-radius: 14px;
            background: #fff;
        }

        .rss-track {
            display: inline-flex;
            align-items: center;
            gap: 28px;
            min-width: max-content;
            padding: 11px 18px;
            animation: rss-scroll 82s linear infinite;
            white-space: nowrap;
        }

        .rss-ticker:hover .rss-track {
            animation-play-state: paused;
        }

        .rss-item {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            color: #334155;
            font-weight: 600;
            text-decoration: none;
        }

        a.rss-item:hover {
            color: #1d4ed8;
            text-decoration: underline;
            text-underline-offset: 3px;
        }

        .rss-item i {
            color: #dc2626;
        }

        .rss-card .fd-brand-name {
            font-family: var(--fd-font-main);
            font-weight: 500;
        }

        body.darkmode #homePage {
            background: #0f172a;
            color: #f8fafc;
        }

        body.darkmode .home-hero p {
            color: #94a3b8;
        }

        body.darkmode .dashboard-card,
        body.darkmode .home-section-card,
        body.darkmode .calendar-card,
        body.darkmode .home-calendar-card,
        body.darkmode .rss-card {
            background: #172036 !important;
            border-color: #27354b !important;
            box-shadow: 0 14px 30px rgba(0, 0, 0, .22);
        }

        body.darkmode .home-card-title,
        body.darkmode .home-main-grid h5,
        body.darkmode .calendar-day-title,
        body.darkmode .calendar-month-label,
        body.darkmode .home-calendar-card #calendarMonthLabel {
            color: #f8fafc !important;
        }

        body.darkmode .home-quickbar {
            background: #172036;
            border-color: #27354b;
            box-shadow: 0 12px 26px rgba(0, 0, 0, .20);
        }

        body.darkmode .home-quick-action,
        body.darkmode .home-quick-action.is-primary {
            background: #172036;
            border-color: #27354b;
            color: #dbeafe;
        }

        body.darkmode .home-quick-action:hover,
        body.darkmode .home-quick-action:focus,
        body.darkmode .home-quick-action.is-primary:hover,
        body.darkmode .home-quick-action.is-primary:focus {
            background: #2563eb;
            color: #fff;
        }

        body.darkmode .missing-document-group,
        body.darkmode .missing-document-row,
        body.darkmode .home-today-event,
        body.darkmode .recent-row,
        body.darkmode .calendar-event-row {
            background: #111827;
            border-color: #334155;
        }

        body.darkmode .missing-document-item,
        body.darkmode .home-today-title,
        body.darkmode .home-today-meta,
        body.darkmode .recent-row .card-info,
        body.darkmode .workbook-status {
            color: #cbd5e1;
        }

        body.darkmode .missing-document-icon,
        body.darkmode .recent-avatar,
        body.darkmode .calendar-event-source {
            background: #1d2940;
            color: #93c5fd;
        }

        body.darkmode .home-today-time {
            background: rgba(37, 99, 235, .18);
            border-left-color: #60a5fa;
            color: #bfdbfe;
        }

        body.darkmode .calendar-view-switch,
        body.darkmode .calendar-grid,
        body.darkmode .calendar-weekday,
        body.darkmode .calendar-day,
        body.darkmode .calendar-week-day,
        body.darkmode .calendar-timeline,
        body.darkmode .outlook-sync-panel {
            background: #111827;
            border-color: #334155;
            color: #e2e8f0;
        }

        body.darkmode .calendar-weekday {
            background: #1d2940;
            color: #cbd5e1;
        }

        body.darkmode .calendar-day {
            border-color: #27354b;
            color: #e2e8f0;
        }

        body.darkmode .calendar-day.is-muted {
            color: #64748b;
        }

        body.darkmode .calendar-day:not(.is-muted):hover {
            background: #1d2940;
            color: #bfdbfe;
        }

        body.darkmode .calendar-day.has-event .calendar-day-number {
            color: #e2e8f0;
        }

        body.darkmode .calendar-today-btn {
            background: #111827 !important;
            border-color: #334155 !important;
            color: #e2e8f0 !important;
        }

        body.darkmode .calendar-week-event,
        body.darkmode .calendar-timeline-event {
            background: #1d2940;
            border-color: #3b82f6;
            color: #f8fafc;
        }

        body.darkmode .calendar-week-event-time,
        body.darkmode .calendar-timeline-event-time,
        body.darkmode .calendar-week-empty,
        body.darkmode .calendar-week-more,
        body.darkmode .outlook-status {
            color: #94a3b8;
        }

        body.darkmode .calendar-week-event-title,
        body.darkmode .calendar-timeline-event-title {
            color: #f8fafc;
        }

        body.darkmode .calendar-empty-day {
            background: #111827;
            border-color: #334155;
            color: #cbd5e1;
        }

        body.darkmode .rss-ticker {
            background: #111827;
            border-color: #334155;
        }

        body.darkmode .rss-item {
            color: #cbd5e1;
        }

        body.darkmode a.rss-item:hover {
            color: #93c5fd;
        }

        @keyframes rss-scroll {
            from {
                transform: translateX(0);
            }

            to {
                transform: translateX(-50%);
            }
        }

        body.darkmode .rss-ticker,
        body.darkmode .outlook-sync-panel {
            background: #172036;
            border-color: #334155;
        }

        body.darkmode .rss-item {
            color: #f8fafc;
        }

        @media (max-width: 1500px) {
            .dashboard-grid {
                grid-template-columns: repeat(6, minmax(130px, 1fr));
            }

            .home-main-grid {
                grid-template-columns: minmax(250px, .85fr) minmax(300px, 1fr) minmax(540px, 2fr);
            }
        }

        @media (max-width: 1180px) {
            .dashboard-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

            .home-quickbar {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

            .home-quick-action:nth-child(3) {
                border-right: 0;
            }

            .home-quick-action:nth-child(4) {
                border-left: 0;
                border-top: 1px solid #e5edf7;
            }

            .home-quick-action:nth-child(5),
            .home-quick-action:nth-child(6) {
                border-top: 1px solid #e5edf7;
            }

            .home-main-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                grid-template-rows: auto;
                max-width: none;
                overflow: visible;
                align-items: stretch;
            }

            .home-main-grid > div:nth-child(1) {
                grid-column: 1;
                grid-row: 1;
            }

            .home-main-grid > div:nth-child(2) {
                grid-column: 2;
                grid-row: 1 / span 2;
            }

            .home-main-grid > div:nth-child(3) {
                grid-column: 1 / -1;
                grid-row: 3;
            }

            .home-main-grid > div:nth-child(4) {
                grid-column: 1;
                grid-row: 2;
            }

            .home-main-grid .home-section-card {
                min-height: 250px;
            }

            .home-main-grid .home-calendar-card {
                height: auto;
                min-height: 0;
            }
        }

        @media (max-width: 980px) {
            .dashboard-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 760px) {
            #homePage {
                height: calc(100dvh - 127px);
                overflow: hidden;
                padding-bottom: 0;
            }

            .home-scroll-area {
                overflow-y: auto;
            }

            .home-main-grid {
                grid-template-columns: 1fr;
                grid-template-rows: none;
                overflow: visible;
            }

            .home-main-grid > div:nth-child(1) {
                grid-column: 1;
                grid-row: 1;
            }

            .home-main-grid > div:nth-child(4) {
                grid-column: 1;
                grid-row: 2;
            }

            .home-main-grid > div:nth-child(2) {
                grid-column: 1;
                grid-row: 3;
            }

            .home-main-grid > div:nth-child(3) {
                grid-column: 1;
                grid-row: 4;
            }

            .home-main-grid .home-section-card {
                height: auto;
                max-height: none;
            }

            .home-main-grid .home-calendar-card {
                min-height: 560px;
            }

            .calendar-card {
                display: flex;
                flex-direction: column;
            }

            .calendar-layout {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 900px) {
            .calendar-grid {
                grid-template-columns: repeat(7, minmax(0, 1fr));
            }

            .calendar-title-block {
                align-items: flex-start;
                flex-direction: column;
            }

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

            .calendar-week-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .calendar-week-day {
                min-height: 170px;
            }

            .outlook-actions .btn {
                min-height: 40px;
            }
        }

        @media (max-width: 620px) {
            .calendar-week-grid {
                grid-template-columns: minmax(0, 1fr);
            }

            .calendar-view-switch {
                width: 100%;
            }
        }

        @media (max-height: 860px) and (min-width: 1281px) {
            .home-hero {
                margin-bottom: 14px;
            }

            .home-hero h1 {
                font-size: 24px;
            }

            .home-hero p {
                font-size: 14px;
            }

            .dashboard-grid {
                gap: 12px;
                margin-bottom: 14px;
            }

            .dashboard-card {
                min-height: 86px;
                padding: 14px;
            }

            .dashboard-icon {
                width: 42px;
                height: 42px;
                flex-basis: 42px;
                font-size: 20px;
            }

            .dashboard-value {
                font-size: 24px;
            }

            .home-section-card {
                padding: 16px;
            }

            .home-main-grid {
                grid-template-columns: minmax(290px, .95fr) minmax(320px, 1.05fr) minmax(560px, 2fr);
                gap: 16px;
            }

            .calendar-controls {
                margin-bottom: 0;
            }

            #calendarSelectedDate {
                margin-bottom: 0 !important;
            }

            .calendar-layout {
                display: block;
            }

            .calendar-card .outlook-sync-panel {
                margin-top: 0;
            }

            .outlook-sync-panel {
                padding: 10px;
            }

            .calendar-timeline {
                --slot-height: 16px;
            }

            .rss-card {
                margin-top: 12px !important;
                margin-bottom: 0;
            }
        }

        @media (max-height: 700px) and (min-width: 1281px) {
            .home-hero {
                display: none;
            }

            .dashboard-grid {
                grid-template-columns: repeat(3, minmax(220px, 1fr));
            }

            .dashboard-card {
                min-height: 74px;
                padding: 12px;
            }

            .dashboard-icon {
                width: 36px;
                height: 36px;
                flex-basis: 36px;
                font-size: 18px;
            }

            .dashboard-value {
                font-size: 21px;
            }

        }

        @media (max-width: 768px) {
            .app-header {
                align-items: stretch;
                flex-wrap: wrap;
                height: auto;
                min-height: 78px;
            }

            .app-header-search {
                order: 0;
            }

            .dashboard-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .calendar-controls {
                gap: 10px;
                justify-content: space-between;
            }

            .calendar-today-btn {
                min-width: 92px;
                flex: 1 1 auto;
            }

            .outlook-actions {
                grid-template-columns: 1fr;
            }

            .recent-row {
                grid-template-columns: 38px minmax(0, 1fr) 30px;
            }

            .recent-doc {
                display: none;
            }
        }

        @media (max-width: 520px) {
            .dashboard-grid {
                grid-template-columns: 1fr;
            }

            .dashboard-card {
                min-height: 88px;
            }

            .calendar-card {
                padding: 14px;
            }

            .calendar-weekday,
            .calendar-day {
                height: 30px;
                font-size: 11px;
            }

            .calendar-day-number {
                width: 24px;
                height: 24px;
                border-radius: 8px;
            }

            .calendar-grid {
                grid-template-rows: 30px repeat(6, 30px);
            }

            .calendar-event-dot {
                bottom: 6px;
                width: 16px;
            }

            .outlook-sync-panel {
                padding: 10px;
            }
        }

        .topbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
        }

        .topbar-title h2 {
            margin: 0;
            font-weight: bold;
        }

        .topbar-subtitle {
            color: #6c757d;
        }

        /* CARDS */

        .card-custom {
            background: white;
            border-radius: 14px;
            padding: 14px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            margin-bottom: 14px;
            width: 100%;
            transition: 0,3s;
        }

        .card-title {
            font-weight: bold;
            color: #1d4ed8;
            margin-bottom: 20px;
        }

        /* FORM */

        .form-control,
        .form-select {
            border-radius: 10px;
            min-height: 44px;
        }

        .form-check {
            margin-bottom: 12px;
        }

        input[type="search"]::-webkit-search-cancel-button {
            cursor: pointer;
        }

        /* PREVIEW */

        .preview-box {
            background: white;
            border-radius: 14px;
            padding: 12px 20px 20px 20px;
            min-height: 100%;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            transition: 0.3s;
        }

        .preview-document {
            background: white;
            border: 1px solid #ddd;
            aspect-ratio: 210 / 297;
            width: 100%;
            margin-top: 20px;
            padding: 50px;
            transition: 0.3s;
        }

        .preview-document h3 {
            text-align: center;
            font-weight: bold;
            margin-bottom: 40px;
        }

        /* BUTTONS */

        .btn-primary {
            background-color: #1d4ed8;
            border: none;
            border-radius: 10px;
            min-height: 48px;
            font-weight: 500;
        }

        .btn-outline-primary {
            border-radius: 10px;
            min-height: 48px;
        }

        .btn-check:checked + label {
            border: 2px solid #1d4ed8 !important;
            background: #eff6ff !important;
         }

body.darkmode .preview-box .a4-page p {

    color: #000 !important;

}

/* DATE ICON */

body.darkmode input[type="date"]::-webkit-calendar-picker-indicator {

    filter: invert(1);

}

/* SELECT PFEIL */

body.darkmode .form-select {

    background-color: #243045;
    color: white;

    filter: brightness(1.1);

}

/* SEARCH X */

body.darkmode input[type="search"]::-webkit-search-cancel-button {

    filter: invert(1);

}

/* TEILNEHMER CARD ANZEIGE */

.teilnehmer-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(370px, 1fr)
        );

    gap: 1rem;

}

.teilnehmer-card {

    width: 100%;

}

.teilnehmer-grid.is-list {

    grid-template-columns: 1fr;

}

.teilnehmer-grid.is-list .teilnehmer-card .card-custom {

    max-height: none !important;

    min-height: 120px;

}

.stammdaten-tabs {

    max-width: 600px;

}

.bg-purple {

    background-color: #6f42c1 !important;

    color: white !important;

}

.text-purple {

    color: #6f42c1 !important;

}

/* BETRIEBE CARD ANZEIGE */

.betriebe-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(370px, 1fr)
        );

    gap: 1rem;

}

.betrieb-card {

    width: 100%;

}

.betriebe-grid.is-list {

    grid-template-columns: 1fr;

}

.betriebe-grid.is-list .betrieb-card .card-custom {

    max-height: none !important;

    min-height: 120px;

}

.page-content {
    display: none;
}

body {
    visibility: hidden;
}

/* DARKMODE REGLER */

.theme-switch {

    position: relative;

}

.theme-switch input {

    display: none;

}

.theme-slider {

    width: 58px;
    height: 30px;

    background: #d1d5db;

    border-radius: 999px;

    cursor: pointer;

    display: block;

    position: relative;

    transition: 0.3s;

}

.theme-icon {

    width: 24px;
    height: 24px;

    background: white;

    border-radius: 50%;

    position: absolute;

    top: 3px;
    left: 3px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: 0.3s;

    color: #f59e0b;

    font-size: 12px;

}

.theme-switch input:checked + .theme-slider .theme-icon {

    left: 31px;

    background: #1f2937;

    color: white;

}

.theme-icon {

    background: white;

    color: #f59e0b;

}

.theme-switch input:checked + .theme-slider .theme-icon {

    left: 31px;

    color: #374151;

}

.theme-switch input:checked + .theme-slider {

    background: #374151;

}

.theme-switch input:checked + .theme-slider .theme-icon {

    left: 31px;

    color: #f8fafc;

}

.theme-switch-header .theme-slider {

    width: 46px;
    height: 24px;
    opacity: .82;

}

.theme-switch-header .theme-icon {

    width: 18px;
    height: 18px;
    top: 3px;
    left: 3px;
    font-size: 10px;

}

.theme-switch-header input:checked + .theme-slider .theme-icon {

    left: 25px;

}

/* BUTTONS FIRMENKARTEN */

.btn.card-action-btn {

    height: 36px !important;

    min-height: 36px !important;

    padding: 0 !important;

    display: flex !important;

    align-items: center !important;

    justify-content: center !important;

    border-radius: 6px !important;

}

#newDatasetBtn {
    width: 168px;
    flex: 0 0 168px;
}

#newDatasetBtn small {
    font-size: 13px;
}

.teilnehmer-card .card-custom,
.betrieb-card .card-custom {

    max-height: 160px;

}

.first-info {

    margin-top: 8px !important;

}

.tooltip-inner {

    font-size: 12px;
    max-width: 250px;

}

/* TOOLTIP */

.tooltip-inner {

    font-size: 12px;

    background-color: #2b2b2b;

    color: #ffffff;

    border: 1px solid #444;

}


body.darkmode .tooltip {

    --bs-tooltip-bg: #2b2b2b;
    --bs-tooltip-color: #ffffff;

}

.card-info {
    color: #6c757d;
}

.darkmode .card-info {
    color: #d1d5db !important;
}

.card-notification-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.card-notification-btn.is-active {
    display: inline-flex;
}

.view-toggle-group {
    width: auto;
}

.formulare-pane {
    display: none;
}

.formulare-pane.is-active {
    display: block;
}

.workbook-pane {
    display: none;
}

.workbook-pane.is-active {
    display: block;
}

#flowSkillsContent.workbook-pane.is-active {
    padding-top: 18px;
}

#teilnehmerGridViewBtn,
#teilnehmerListViewBtn,
#betriebeGridViewBtn,
#betriebeListViewBtn,
#standardUserGridViewBtn,
#standardUserListViewBtn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.standard-user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

.standard-user-photo-wrap {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f6fa;
    flex: 0 0 88px;
}

.standard-user-photo {
    width: 200%;
    height: 200%;
    object-fit: cover;
    object-position: center top;
    transform: translateX(-25%);
    display: block;
}

.standard-user-photo.photo-focus-right {
    transform: translateX(-12%);
}

.standard-user-card {
    height: 245px;
}

.standard-user-card.standard-user-muted {
    background: #f8fafc;
}

.standard-user-card.standard-user-muted .standard-user-main {
    opacity: .38;
    filter: grayscale(1);
}

.standard-user-card.standard-user-muted .standard-user-actions {
    opacity: 1;
    filter: none;
}

body.darkmode .standard-user-card.standard-user-muted {
    background: #111827;
}

.standard-user-meta {
    min-width: 0;
}

.standard-user-meta .fw-bold {
    line-height: 1.2;
}

.standard-user-title {
    font-style: italic;
}

.standard-user-grid.is-list {
    grid-template-columns: 1fr;
}

.standard-user-grid.is-list .standard-user-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 180px;
    align-items: center;
    gap: 16px;
    height: auto;
    min-height: 128px;
}

.standard-user-grid.is-list .standard-user-photo-wrap {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
}

.standard-user-grid.is-list .standard-user-main {
    margin-bottom: 0 !important;
}

.standard-user-grid.is-list .standard-user-actions {
    flex-direction: column;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.standard-user-grid.is-list .standard-user-extra {
    display: none;
}

.settings-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    grid-template-areas:
        "documents babe"
        "calendar weather"
        "radio system"
        "migration maintenance"
        "flowkv flowkv"
        "skills skills";
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.settings-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
    padding: 6px;
    border: 1px solid #dbe5f0;
    border-radius: 12px;
    background: #f8fafc;
}

.settings-tabs .btn {
    height: 44px;
    border-radius: 8px !important;
}

.settings-section {
    display: none;
}

.settings-section.is-active {
    display: block;
}

.settings-card {
    margin-bottom: 0;
    padding: 16px;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.35;
    overflow: hidden;
}

.settings-user-card {
    grid-column: 1 / -1;
}

.settings-system-card {
    grid-area: system;
}

.settings-documents-card {
    grid-area: documents;
}

.settings-maintenance-card {
    grid-area: maintenance;
}

.settings-babe-card {
    grid-area: babe;
}

.settings-calendar-card {
    grid-area: calendar;
}

.settings-weather-card {
    grid-area: weather;
}

.settings-radio-card {
    grid-area: radio;
}

.settings-migration-card {
    grid-area: migration;
}

.settings-flowkv-card {
    grid-area: flowkv;
}

.settings-flowskills-card {
    grid-area: skills;
}

.settings-migration-list {
    display: grid;
    gap: 8px;
}

.settings-migration-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.settings-migration-main {
    min-width: 0;
}

.settings-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    justify-content: space-between;
    min-width: 0;
}

.settings-user-head-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.settings-icon-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.settings-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    color: #1d4ed8;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    font-size: 20px;
}

.settings-card-title {
    color: #020617;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
}

.settings-card-subtitle {
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.25;
    margin-top: 2px;
}

.settings-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 12px;
}

.settings-card label,
.settings-card .form-check-label {
    color: #020617;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 6px;
    letter-spacing: 0;
}

.settings-card .form-check {
    min-height: 44px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px 11px;
}

.settings-card .form-check-input {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: 0 0 16px;
}

.settings-card .form-control,
.settings-card .form-select {
    min-height: 42px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
}

.settings-card .form-control::placeholder {
    color: #64748b;
    opacity: 1;
}

.settings-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.settings-folder-list {
    display: grid;
    gap: 8px;
}

.settings-folder-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.settings-folder-main {
    min-width: 0;
}

.settings-folder-title {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}

.settings-folder-path {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-folder-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.settings-folder-actions .settings-open-folder {
    width: 36px;
    min-width: 36px;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.settings-muted-line {
    padding: 10px 0;
    border-top: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 13px;
    line-height: 1.35;
}

.settings-save-btn {
    height: 36px !important;
    min-height: 36px !important;
    width: auto !important;
    min-width: 124px !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    border-radius: 6px !important;
}

.settings-save-btn i {
    margin-right: 0 !important;
    font-size: 14px;
    line-height: 1;
}

.settings-admin-action-btn {
    width: 148px !important;
    min-width: 148px !important;
}

.settings-admin-note {
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.35;
}

.settings-admin-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.settings-admin-status-item {
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 9px 10px;
}

.settings-admin-status-value {
    color: #020617;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
}

.settings-admin-status-label {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.2;
}

.settings-admin-progress {
    display: grid;
    gap: 7px;
}

.settings-admin-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #334155;
    font-size: 13px;
}

.settings-admin-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.settings-admin-progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #1d4ed8;
    transition: width .2s ease;
}

.settings-admin-log {
    max-height: 170px;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    padding: 8px;
    display: grid;
    gap: 5px;
    font-size: 12px;
    line-height: 1.35;
}

.settings-admin-log-line {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
    color: #475569;
}

.settings-admin-log-line.is-error {
    color: #b91c1c;
}

.settings-admin-log-line.is-ok {
    color: #15803d;
}

.settings-admin-log-time {
    color: #64748b;
    white-space: nowrap;
}

.rss-url-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.rss-url-dropdown {
    margin-top: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.rss-url-dropdown summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
}

.rss-url-dropdown summary::-webkit-details-marker {
    display: none;
}

.rss-url-dropdown summary i {
    transition: transform .16s ease;
}

.rss-url-dropdown[open] summary i {
    transform: rotate(180deg);
}

.rss-url-dropdown-body {
    padding: 0 12px 12px;
    border-top: 1px solid #e5e7eb;
}

.rss-url-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
    align-items: center;
}

.rss-url-row .btn {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.darkmode .settings-tabs {
    background: #111827;
    border-color: #27354b;
}

body.darkmode .settings-card,
body.darkmode .settings-card-title,
body.darkmode .settings-card label,
body.darkmode .settings-card .form-check-label,
body.darkmode .settings-folder-title,
body.darkmode .settings-admin-status-value {
    color: #f8fafc;
}

body.darkmode .settings-card-subtitle,
body.darkmode .settings-folder-path,
body.darkmode .settings-muted-line,
body.darkmode .settings-admin-status-label {
    color: #94a3b8;
}

body.darkmode .settings-card-icon {
    background: rgba(37, 99, 235, .18);
    border-color: rgba(147, 197, 253, .26);
    color: #93c5fd;
}

body.darkmode .settings-card .form-check,
body.darkmode .settings-folder-row,
body.darkmode .settings-migration-row,
body.darkmode .settings-admin-status-item,
body.darkmode .settings-admin-log,
body.darkmode .rss-url-dropdown {
    background: #111827;
    border-color: #334155;
}

body.darkmode .settings-muted-line,
body.darkmode .rss-url-dropdown-body {
    border-top-color: #334155;
}

body.darkmode .rss-url-dropdown summary {
    color: #f8fafc;
}

@media (max-width: 1200px) {
    .settings-overview-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "documents"
            "babe"
            "calendar"
            "weather"
            "radio"
            "system"
            "migration"
            "maintenance"
            "flowkv"
            "skills";
        gap: 14px;
    }
}

@media (max-width: 700px) {
    .settings-tabs {
        grid-template-columns: 1fr;
        padding: 5px;
    }

    .settings-tabs .btn {
        height: 42px;
    }

    .settings-card {
        padding: 14px;
    }

    .settings-card-head {
        gap: 10px;
    }

    .settings-card-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 18px;
    }

    .settings-field-grid,
    .settings-action-grid,
    .settings-admin-status-grid {
        grid-template-columns: 1fr;
    }

    .settings-folder-row,
    .settings-migration-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .settings-folder-actions {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 36px;
    }

    .settings-folder-actions .btn:not(.settings-open-folder) {
        width: 100%;
    }

    .settings-save-btn {
        width: 100% !important;
        min-width: 0 !important;
    }

    .settings-card .d-flex.justify-content-end {
        justify-content: stretch !important;
    }

    .rss-url-row {
        grid-template-columns: minmax(0, 1fr) 36px;
    }
}

.btn-refresh {

    font-size: 1.4rem;

    font-weight: bold;

    height: 34px;

    width: 34px;

    align-items: center;

    justify-content: center;

}

.preview-actions .btn {

    height: 34px;

    padding: 0 12px;

    font-size: 0.9rem;

}

.pdf-wrapper {

    position: relative;

    width: 100%;

    aspect-ratio: 210 / 297;

    background: white;

    border-radius: 10px;

    overflow: hidden;
}

.briefpapier-overlay {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    object-fit: fill;

    pointer-events: none;

    z-index: 2;

}

        .a4-preview {

            width: 100%;

            height: 100%;

    aspect-ratio: 210 / 297;

    object-fit: fill;

    background: white;

    position: absolute;

    inset: 0;

            z-index: 1;
        }

        .a4-preview.is-placeholder {
            background: #eef1f5;
            border: 1px dashed #c9d1dc;
            object-fit: fill;
        }

.briefpapier-preview {

    position: absolute;

    width: 100%;

    max-width: 900px;

    aspect-ratio: 210 / 297;

    object-fit: contain;

    pointer-events: none;

    z-index: 1;
}

.a4-preview,
.briefpapier-overlay {

    display: block;

    border-radius: 10px;
}

.preview-shadow {

    margin-top: 25px;

    display: flex;

    justify-content: center;

    border-radius: 10px;

    box-shadow:
        0 4px 12px rgba(0,0,0,.08);
}

.zusatzvereinbarungen-card {

    flex: 1 1 auto;

    display: flex;

    flex-direction: column;
}

.zusatzvereinbarungen-card textarea {

    flex: 1 1 auto;

    min-height: 0;
}

.preview-nav {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    z-index: 10;

    width: 48px;

    height: 48px;

    border: none;

    border-radius: 50%;

    background: rgba(255,255,255,.9);

    box-shadow:
        0 2px 8px rgba(0,0,0,.15);

    cursor: pointer;
}

.prev {

    left: 15px;
}

.next {

    right: 15px;
}
