.sibec-login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
    background: #f4f7fb;
}

.sibec-login-visual {
    position: relative;
    align-items: flex-end;
    padding: clamp(40px, 7vw, 88px);
    background:
        linear-gradient(120deg, rgba(0, 134, 172, .94), rgba(199, 1, 143, .76)),
        url("../../mat-dash/assets/images/backgrounds/login-bg.jpg") center/cover;
}

.sibec-login-visual__content {
    max-width: 640px;
}

.sibec-login-visual h1 {
    font-size: clamp(2.4rem, 4.8vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: 0;
}

.sibec-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.sibec-login-card {
    width: min(100%, 460px);
}

.sibec-dashboard-clock {
    min-height: 112px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, .12);
}

.sibec-home-hero {
    border-radius: 8px;
    padding: clamp(24px, 4vw, 44px);
    margin-bottom: 24px;
    background:
        linear-gradient(120deg, rgba(0, 134, 172, .96), rgba(199, 1, 143, .82)),
        url("../../mat-dash/assets/images/backgrounds/welcome-bg2.png") right center/auto 100% no-repeat;
    overflow: hidden;
}

.sibec-home-hero h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.sibec-dashboard-clock strong {
    color: #fff;
    font-size: clamp(1.4rem, 2vw, 2rem);
}

.sibec-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex: 0 0 auto;
}

.left-sidebar .sidebar-link > span:first-child {
    width: 22px;
    min-width: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.left-sidebar .sidebar-link i.ti {
    font-size: 20px;
    line-height: 1;
}

.system-user-page .btn i.ti,
.system-company-page .btn i.ti {
    font-size: 16px;
    line-height: 1;
}

.system-user-page .btn-sm,
.system-company-page .btn-sm {
    width: 34px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.system-user-page .btn:not(.btn-sm),
.system-company-page .btn:not(.btn-sm) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.system-user-page .btn-group form,
.system-company-page .btn-group form {
    display: inline-flex;
}

.pagination svg {
    width: 16px;
    height: 16px;
}

.pagination .page-link {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

html[data-bs-theme="dark"] .btn-light {
    --bs-btn-color: #dce6f1;
    --bs-btn-bg: #202b37;
    --bs-btn-border-color: #334253;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #2b3948;
    --bs-btn-hover-border-color: #435468;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #334253;
    --bs-btn-active-border-color: #52657b;
    color: var(--bs-btn-color) !important;
    background-color: var(--bs-btn-bg) !important;
    border-color: var(--bs-btn-border-color) !important;
}

html[data-bs-theme="dark"] .btn-light:hover,
html[data-bs-theme="dark"] .btn-light:focus {
    color: var(--bs-btn-hover-color) !important;
    background-color: var(--bs-btn-hover-bg) !important;
    border-color: var(--bs-btn-hover-border-color) !important;
}

html[data-bs-theme="dark"] .btn-outline-danger {
    --bs-btn-color: #ff8b9a;
    --bs-btn-border-color: #7e3644;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #dc3545;
    --bs-btn-hover-border-color: #dc3545;
}

html[data-bs-theme="dark"] .text-dark,
html[data-bs-theme="dark"] a.text-dark,
html[data-bs-theme="dark"] .fw-semibold.text-dark {
    color: #e7edf5 !important;
}

html[data-bs-theme="dark"] .text-muted {
    color: #a9b6c5 !important;
}

html[data-bs-theme="dark"] .badge.bg-light,
html[data-bs-theme="dark"] .badge.bg-light.text-dark {
    color: #dce6f1 !important;
    background-color: #263342 !important;
    border: 1px solid #3a4b5f;
}

html[data-bs-theme="dark"] .table {
    --bs-table-color: #dce6f1;
    --bs-table-border-color: #2e3c4c;
    --bs-table-hover-color: #ffffff;
    --bs-table-hover-bg: rgba(255, 255, 255, .04);
}

html[data-bs-theme="dark"] .sibec-calendar-event {
    color: #9ee6ff;
    background: rgba(0, 134, 172, .22);
    border: 1px solid rgba(158, 230, 255, .18);
}

html[data-bs-theme="dark"] .sibec-calendar-collab-toggle,
html[data-bs-theme="dark"] .sibec-calendar-collab-list {
    background: rgba(0, 0, 0, .22);
    color: #dce6f1;
}

html[data-bs-theme="dark"] .sibec-calendar-collab-list div + div {
    border-top-color: rgba(255, 255, 255, .12);
}

.sibec-collaboration-matrix {
    --sibec-matrix-stripe: #f6f9fc;
    --sibec-matrix-active-bg: #e5f8ee;
    --sibec-matrix-active-border: #95dfb4;
    --sibec-matrix-empty: #9aa8b7;
}

.sibec-collaboration-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bs-card-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.sibec-collaboration-matrix tbody tr:nth-child(even) > * {
    background-color: var(--sibec-matrix-stripe);
}

.sibec-collaboration-matrix tbody tr:hover > * {
    background-color: rgba(var(--bs-primary-rgb), .08);
}

.sibec-collaboration-matrix .sibec-matrix-cell {
    min-width: 72px;
    border-left: 1px solid var(--bs-border-color);
    border-right: 1px solid var(--bs-border-color);
}

.sibec-collaboration-matrix .sibec-matrix-cell.is-active {
    background-color: var(--sibec-matrix-active-bg) !important;
    box-shadow: inset 0 0 0 1px var(--sibec-matrix-active-border);
}

.sibec-matrix-check {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #13b76f;
    box-shadow: 0 6px 14px rgba(19, 183, 111, .24);
    font-size: 20px;
}

.sibec-matrix-empty {
    color: var(--sibec-matrix-empty);
    font-weight: 700;
}

html[data-bs-theme="dark"] .sibec-collaboration-matrix {
    --sibec-matrix-stripe: rgba(255, 255, 255, .035);
    --sibec-matrix-active-bg: rgba(19, 183, 111, .16);
    --sibec-matrix-active-border: rgba(80, 221, 143, .34);
    --sibec-matrix-empty: #7f8fa0;
}

html[data-bs-theme="dark"] .sibec-collaboration-matrix thead th {
    background: var(--bs-card-bg);
}

html[data-bs-theme="dark"] .sibec-matrix-check {
    color: #061f12;
    background: #50dd8f;
    box-shadow: 0 6px 14px rgba(80, 221, 143, .18);
}

.sibec-metric {
    min-height: 96px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 16px;
    background: var(--bs-body-bg);
}

.sibec-metric span {
    display: block;
    color: var(--bs-secondary-color);
    margin-bottom: 8px;
}

.sibec-metric strong {
    font-size: 1.15rem;
}

.sibec-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(140px, 1fr));
    gap: 8px;
    overflow-x: auto;
}

.sibec-calendar-day {
    min-height: 132px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 10px;
    background: var(--bs-body-bg);
}

.sibec-calendar-event {
    display: block;
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 6px;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    line-height: 1.2;
}

.sibec-calendar-event a {
    color: inherit;
}

.sibec-calendar-event span,
.sibec-calendar-event small {
    display: block;
}

.sibec-calendar-event small {
    opacity: .72;
}

.sibec-calendar-collab-toggle {
    width: 100%;
    border: 0;
    border-radius: 6px;
    margin-top: 6px;
    padding: 5px 7px;
    background: rgba(255, 255, 255, .72);
    color: var(--bs-primary);
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
}

.sibec-calendar-collab-list {
    border-radius: 6px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, .68);
    color: var(--bs-body-color);
    font-size: .72rem;
}

.sibec-calendar-collab-list div + div {
    border-top: 1px solid rgba(0, 0, 0, .08);
    margin-top: 4px;
    padding-top: 4px;
}

.sibec-gantt {
    min-width: 920px;
}

.sibec-gantt-range {
    margin-left: 180px;
    margin-bottom: 12px;
    color: var(--bs-secondary-color);
    font-weight: 600;
}

.sibec-gantt-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.sibec-gantt-label {
    font-weight: 700;
}

.sibec-gantt-track {
    position: relative;
    min-height: 42px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-tertiary-bg);
    overflow: hidden;
}

.sibec-gantt-bar {
    position: absolute;
    top: 7px;
    height: 28px;
    border-radius: 6px;
    padding: 5px 10px;
    color: #fff;
    font-size: .8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sibec-gantt-planning { background: #13b76f; }
.sibec-gantt-on_progress { background: #f6a609; }
.sibec-gantt-running { background: #0086ac; }
.sibec-gantt-finished { background: #5a6a85; }
.sibec-gantt-cancel { background: #fa4d56; }

@media (max-width: 991.98px) {
    .sibec-login-page {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .sibec-login-panel {
        padding: 24px;
    }
}
