/* ===== Top Navbar ===== */

.top-navbar-shell {
    width: 100%;
    margin-top: 0;
    padding: 0 4px;
}

.top-navbar {
    position: relative;
    width: 100%;
    min-height: 46px;
    margin: 0 auto;
    overflow: visible;
    background: #474747;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px 0 12px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.top-navbar-gloss {
    display: none;
}

.top-navbar-art {
    display: none;
}

.top-navbar-art-red {
    display: none;
}

.top-navbar-left {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.top-navbar-logo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.top-navbar-logo {
    width: 96px;
    height: auto;
    max-width: 96px;
    display: block;
    object-fit: contain;
}

.top-navbar-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
}

.top-navbar-title {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-navbar-title-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.top-navbar-title-link:hover,
.top-navbar-title-link:focus {
    color: inherit;
    text-decoration: none;
}

.top-navbar-nav-dropdown {
    display: inline-flex;
    align-items: center;
}

.top-navbar-nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}

.top-navbar-nav-toggle:hover,
.top-navbar-nav-toggle:focus,
.top-navbar-nav-toggle.show {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    border-radius: 4px;
}

.top-navbar-nav-caret {
    font-size: 0.7rem;
    line-height: 1;
}

.top-navbar-nav-menu {
    min-width: 220px;
    margin-top: 10px;
    padding: 6px 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.top-navbar-nav-item {
    padding: 0.48rem 0.95rem;
    font-size: 0.88rem;
    color: #353b42;
}

.top-navbar-nav-item:hover,
.top-navbar-nav-item:focus {
    background: #f4f6f8;
    color: #1f252b;
}

.top-navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    white-space: nowrap;
    margin-left: 20px;
    padding: 0;
    font-weight: 500;
    color: #fff;
}

.top-navbar-session {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.96rem;
    font-weight: 500;
}

.top-navbar-session-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.top-navbar-session-time {
    min-width: 58px;
    letter-spacing: 0.02em;
}

.top-navbar-user-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.top-navbar-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.top-navbar-user-toggle:hover,
.top-navbar-user-toggle:focus,
.top-navbar-user-toggle.show {
    color: #fff;
    background: transparent;
    box-shadow: none;
}

.top-navbar-user-avatar {
    font-size: 1.7rem;
    line-height: 1;
}

.top-navbar-user-name {
    font-size: 0.98rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.96);
}

.top-navbar-user-caret {
    font-size: 0.78rem;
    line-height: 1;
    margin-left: 2px;
}

.top-navbar-auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    min-width: auto;
    padding: 0;
    margin-right: 0;
    background: transparent;
    border-bottom-right-radius: 0;
}

.top-navbar-logout-form {
    margin: 0;
}

.top-navbar-dropdown-menu {
    min-width: 188px;
    margin-top: 10px;
    padding: 8px 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    z-index: 1080;
}

.top-navbar-dropdown-header {
    padding: 4px 14px 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #68707c;
}

.top-navbar-dropdown-divider {
    margin: 0.2rem 0 0.35rem;
}

.top-navbar-dropdown-item {
    font-size: 0.9rem;
    padding: 0.5rem 0.95rem;
    color: #2f3640;
}

.top-navbar-dropdown-item:hover,
.top-navbar-dropdown-item:focus {
    background: #f4f6f8;
    color: #1f252b;
}

.top-navbar-guest {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.96rem;
    font-weight: 500;
}

/* ===== Layout ===== */

.page-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    padding: 20px 18px 28px;
}

.page-content > main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.login-page-wrap {
    display: flex;
    flex: 1 0 auto;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 8px 0 0 12px;
}

.login-panel {
    width: 100%;
    max-width: 340px;
}

.login-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1b1b1b;
}

.login-label {
    display: none;
}

.login-input {
    height: 46px;
    border-radius: 4px;
    font-size: 0.96rem;
}

.login-submit-btn {
    min-width: 108px;
    border-radius: 4px;
    background: #ffbf1f;
    border: 1px solid #ffbf1f;
    color: #111;
    font-weight: 600;
}

.login-submit-btn:hover,
.login-submit-btn:focus {
    background: #f0b10b;
    border-color: #f0b10b;
    color: #111;
}

@media (max-width: 640px) {
    .top-navbar {
        padding: 0 10px;
    }

    .top-navbar-title {
        font-size: 14px;
    }

    .top-navbar-divider {
        display: none;
    }

    .top-navbar-nav-toggle {
        padding: 0 8px;
        font-size: 0.82rem;
    }

    .top-navbar-art {
        width: 150px;
    }

    .top-navbar-right {
        font-size: 12px;
        gap: 8px;
        margin-left: 12px;
    }

    .top-navbar-session {
        gap: 7px;
        font-size: 0.82rem;
    }

    .top-navbar-session-icon,
    .top-navbar-user-avatar {
        font-size: 1.35rem;
    }

    .top-navbar-user-name,
    .top-navbar-guest {
        font-size: 0.82rem;
    }
}

footer.footer {
    margin-top: auto;
    text-align: center;
}

footer.footer .container {
    text-align: center;
}

.footer-compact {
    border-top: 1px solid #d9dde3;
    background: #f3f5f8;
}

.footer-compact-inner {
    padding: 7px 12px;
    font-size: 0.72rem;
    color: #7b8593;
    letter-spacing: 0.01em;
}

/* ===== Dashboard Top Area ===== */

.dashboard-top {
    margin-top: 8px;
}

.dashboard-filter-form {
    max-width: none;
}

.dashboard-filter-toolbar {
    width: 100%;
}

.dashboard-date-field {
    width: 190px;
}

.dashboard-company-field {
    width: 360px;
    max-width: 100%;
}

.dashboard-filter-subrow {
    width: 100%;
}

.dashboard-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 10px 0 0;
    flex-wrap: wrap;
}

.dashboard-actions-inline {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.dashboard-actions-left,
.dashboard-actions-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.dashboard-actions-right {
    margin-left: auto;
    justify-content: flex-end;
}

.dashboard-metrics {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-filter-label {
    margin-bottom: 0.2rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #2f2f2f;
}

.dashboard-filter-input {
    height: 28px;
    padding: 0.2rem 0.55rem;
    font-size: 0.82rem;
    border-color: #d8d8d8;
}

.dashboard-load-btn {
    min-width: 96px;
    height: 30px;
    padding: 0.2rem 0.95rem;
    border: 1px solid #2d67d8;
    border-radius: 0.35rem;
    background: linear-gradient(180deg, #3a80f7 0%, #2a66df 100%);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 1px 2px rgba(25, 66, 145, 0.18);
}

.dashboard-load-btn:hover {
    background: linear-gradient(180deg, #4a8bf7 0%, #326fe6 100%);
    color: #fff;
}

.dashboard-load-btn:focus,
.dashboard-load-btn:active {
    color: #fff;
    background: linear-gradient(180deg, #2f73ec 0%, #285fd0 100%);
    border-color: #285fd0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 0.15rem rgba(48, 109, 230, 0.16);
}

.dashboard-top-left,
.dashboard-top-right,
.timer-mini-block {
    min-width: 0;
}

.icon-stack {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.icon-overlay {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 12px;
    background: #fff;
    border-radius: 50%;
    line-height: 1;
}

.icon-success {
    color: #34a853;
}

.icon-danger {
    color: #e53935;
}


/* ===== Global Summary Toolbar ===== */

.summary-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.dashboard-table-area {
    margin-top: 24px;
}

.sql-unavailable-alert {
    max-width: 920px;
    margin: 0 0 14px;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    border-color: #f2cf72;
    background: #fff7df;
    color: #6f5200;
}

.wemacom-table thead th {
    background-color: #f6d060 !important;
    border-color: #d6b04e !important;
    color: #1f1f1f;
}

.wemacom-table {
    table-layout: fixed;
    width: 100%;
}

.wemacom-table col.detail-col-action {
    width: 96px;
}

.wemacom-table col.detail-col-select {
    width: 38px;
}

.wemacom-table col.detail-col-id {
    width: 70px;
}

.wemacom-table col.detail-col-project {
    width: 96px;
}

.wemacom-table col.detail-col-date {
    width: 110px;
}

.wemacom-table col.detail-col-timevon,
.wemacom-table col.detail-col-timebis {
    width: 88px;
}

.wemacom-table col.detail-col-duration {
    width: 110px;
}

.wemacom-table col.aus-col-monat,
.wemacom-table col.aus-col-jahr {
    width: 120px;
}

.wemacom-table col.aus-col-auslastung,
.wemacom-table col.aus-col-umsatz {
    width: 140px;
}

.wemacom-table col.summary-col-project {
    width: 96px;
}

.wemacom-table col.summary-col-date {
    width: 120px;
}

.wemacom-table col.summary-col-company,
.wemacom-table col.summary-col-task {
    width: 245px;
}

.wemacom-table col.summary-col-duration {
    width: 190px;
}

.wemacom-table col.summary-col-month {
    width: 80px;
}

.dashboard-table-area .card.shadow-sm.border-0 {
    background: transparent;
    box-shadow: none !important;
}

.detail-table-pagination-wrap {
    padding: 12px 16px 14px;
    border-top: 1px solid #edf0f5;
    background: transparent;
}

.detail-table-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px 6px;
    background: transparent;
}

.detail-table-toolbar-action-start {
    align-items: center;
    justify-content: flex-start;
}

.detail-table-toolbar-table-edge {
    padding-left: 0;
    padding-right: 0;
}

.detail-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-edit-panel {
    padding: 6px 0;
    border-bottom: 1px solid #edf0f5;
    background: transparent;
}

.detail-edit-panel-btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 2px;
    color: #fff;
    font-size: 0.82rem;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.detail-edit-panel-cancel {
    background: #d9534f;
}

.detail-edit-panel-save {
    background: #e5a216;
}

.detail-edit-panel-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #50545b;
    align-self: center;
    display: none;
}

.detail-edit-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 6px 10px;
    align-items: end;
    width: 100%;
}

.detail-edit-panel-field {
    min-width: 0;
    padding: 0;
}

.detail-edit-panel-field .form-label {
    margin-bottom: 0.15rem;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #2f2f2f;
}

.detail-edit-panel-field .form-control,
.detail-edit-panel-field .form-select {
    height: 30px;
    width: 100%;
}

.detail-edit-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 1;
    grid-row: 1;
    padding: 0 0 2px;
}

.detail-action-header {
    width: 96px;
    min-width: 96px;
    vertical-align: top;
}

.detail-edit-panel-grid-detail .detail-grid-project,
.detail-edit-panel-grid-auslastung .detail-grid-project,
.detail-edit-panel-grid-detail .detail-grid-date,
.detail-edit-panel-grid-detail .detail-grid-company,
.detail-edit-panel-grid-detail .detail-grid-task,
.detail-edit-panel-grid-detail .detail-grid-timevon,
.detail-edit-panel-grid-detail .detail-grid-timebis,
.detail-edit-panel-grid-auslastung .detail-grid-monat,
.detail-edit-panel-grid-auslastung .detail-grid-jahr,
.detail-edit-panel-grid-auslastung .detail-grid-auslastung,
.detail-edit-panel-grid-auslastung .detail-grid-umsatz {
    grid-column: auto;
    grid-row: auto;
}

.detail-selection-count {
    color: #6c757d;
    font-size: 0.82rem;
}

.detail-action-cell {
    width: 96px;
    min-width: 96px;
    white-space: nowrap;
}

.dashboard-primary-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.dashboard-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    border: 0;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.dashboard-primary-btn i {
    font-size: 0.85rem;
}

.dashboard-primary-btn-icon {
    width: 32px;
    min-width: 32px;
    height: 32px;
    justify-content: center;
    padding: 0;
}

.dashboard-primary-btn-icon span {
    display: none;
}

.dashboard-primary-btn-timer {
    background: linear-gradient(180deg, #e6a61c 0%, #c8850a 100%);
}

.dashboard-primary-btn-record {
    background: linear-gradient(180deg, #2bbf56 0%, #16963b 100%);
}

.detail-add-floating-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.82rem;
    border: 0;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.detail-add-record-btn {
    background: linear-gradient(180deg, #2bbf56 0%, #16963b 100%);
}

@media (min-width: 992px) {
    .detail-edit-panel-grid-detail {
        grid-template-columns: 96px 38px 70px 96px 110px minmax(180px, 1fr) minmax(180px, 1fr) 88px 88px 110px;
        column-gap: 0;
        row-gap: 6px;
    }

    .detail-edit-panel-grid-auslastung {
        grid-template-columns: 96px 38px 70px 120px 120px minmax(220px, 1fr) 140px 140px;
        column-gap: 0;
        row-gap: 6px;
    }

    .detail-edit-panel-grid .detail-edit-panel-actions {
        grid-column: 1 / span 3;
        grid-row: 1;
        align-self: end;
    }

    .detail-edit-panel-grid-detail .detail-grid-project,
    .detail-edit-panel-grid-auslastung .detail-grid-monat {
        grid-column: 4;
        grid-row: 1;
    }

    .detail-edit-panel-grid-detail .detail-grid-date,
    .detail-edit-panel-grid-auslastung .detail-grid-jahr {
        grid-column: 5;
        grid-row: 1;
    }

    .detail-edit-panel-grid-detail .detail-grid-company,
    .detail-edit-panel-grid-auslastung .detail-grid-project {
        grid-column: 6;
        grid-row: 1;
    }

    .detail-edit-panel-grid-detail .detail-grid-task,
    .detail-edit-panel-grid-auslastung .detail-grid-auslastung {
        grid-column: 7;
        grid-row: 1;
    }

    .detail-edit-panel-grid-detail .detail-grid-timevon,
    .detail-edit-panel-grid-auslastung .detail-grid-umsatz {
        grid-column: 8;
        grid-row: 1;
    }

    .detail-edit-panel-grid-detail .detail-grid-timebis {
        grid-column: 9;
        grid-row: 1;
    }
}

.detail-row-action {
    color: #2a66df;
    text-decoration: none;
    margin-right: 4px;
    font-size: 0.9rem;
}

.detail-row-action:last-child {
    margin-right: 0;
}

.working-time-summary-table .summary-text-column {
    min-width: 0;
}

.working-time-summary-table thead th {
    white-space: nowrap;
}

.working-time-summary-table tbody .summary-text-column {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.detail-delete-btn,
.detail-cancel-btn {
    color: #d9534f;
}

.detail-save-btn {
    color: #2f9e44;
}

.detail-select-column {
    width: 38px;
    text-align: center;
}

.detail-row-editing td {
    background-color: #fff6e7 !important;
}

.detail-table-pagination-wrap .pagination {
    gap: 4px;
}

.detail-table-pagination-wrap .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border: 1px solid transparent;
    border-radius: 2px;
    color: #d49647;
    background: transparent;
    font-size: 11px;
    line-height: 1;
    box-shadow: none;
}

.detail-table-pagination-wrap .page-link:hover {
    color: #cb8731;
    background: #fff4e6;
    border-color: #f0d5ad;
}

.detail-table-pagination-wrap .page-item.active .page-link {
    color: #fff;
    background: #e49d46;
    border-color: #d68b33;
}

.detail-table-pagination-wrap .page-item.disabled .page-link {
    color: #d7b58e;
    background: transparent;
    border-color: transparent;
}

.top-action-box {
    width: 110px;
    min-width: 110px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 4px 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.22),
        0 3px 8px rgba(0,0,0,0.12);
}

.top-action-box:focus {
    outline: none;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.22),
        0 3px 8px rgba(0,0,0,0.12);
}

.top-action-box-red {
    background: linear-gradient(180deg, #f15600 0%, #d83f00 100%);
    border-color: #b93500;
}

.top-action-box-blue {
    background: linear-gradient(180deg, #2a47ff 0%, #142cff 100%);
    border-color: #1022d4;
}

.top-action-box-purple {
    background: linear-gradient(180deg, #c033f0 0%, #a21ed3 100%);
    border-color: #8513b0;
}

.top-icon-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #d8d8d8;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 100%);
    color: #6d84a3;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.9),
        0 2px 5px rgba(0,0,0,0.08);
    transition: all 0.15s ease;
}

.top-icon-btn:hover {
    background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%);
    color: #3f5f88;
    transform: translateY(-1px);
}


/* ===== Responsive ===== */

@media (max-width: 1600px) {
    .timer-block-row {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 1100px) {
    .timer-block-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .page-content {
        padding: 20px 12px;
    }

    .dashboard-actions-inline {
        justify-content: flex-start;
    }

    .dashboard-actions-right {
        margin-left: 0;
        justify-content: flex-start;
    }

    .top-navbar {
        padding: 0 16px 0 10px;
    }

    .top-navbar-title {
        font-size: 14px;
    }

    .top-navbar-logo {
        width: 90px;
        max-width: 90px;
    }

    .top-navbar-left {
        gap: 8px;
    }

    .top-navbar-right {
        gap: 10px;
        font-size: 12px;
    }

}

@media (max-width: 640px) {
}
