:root {
    --sc-sidebar-width: 260px;
    --sc-sidebar-bg: #0b132b;
    --sc-sidebar-gradient: linear-gradient(180deg, #0b132b 0%, #111a36 60%, #0d152a 100%);
    --sc-sidebar-color: #94a3b8;
    --sc-sidebar-hover: rgba(255, 255, 255, 0.06);
    --sc-sidebar-hover-color: #f8fafc;
    --sc-sidebar-active-bg: linear-gradient(90deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.04) 100%);
    --sc-sidebar-active-color: #60a5fa;
    --sc-sidebar-active-border: #3b82f6;
    --sc-sidebar-border: rgba(255, 255, 255, 0.07);
    --sc-topbar-height: 58px;
    --sc-bg: #f8fafc;
}

body.sc-app-body {
    background-color: var(--sc-bg);
    min-height: 100vh;
    display: flex;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #334155;
    margin: 0;
}

/* Sidebar */
.sc-sidebar {
    width: var(--sc-sidebar-width);
    background: var(--sc-sidebar-gradient);
    color: var(--sc-sidebar-color);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    border-right: 1px solid var(--sc-sidebar-border);
    transition: transform 0.25s ease-in-out;
}

.sc-brand {
    height: var(--sc-topbar-height);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(11, 19, 43, 0.65);
    border-bottom: 1px solid var(--sc-sidebar-border);
}

.sc-brand-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.38) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.sc-brand-title {
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
    line-height: 1.2;
    display: block;
}

.sc-brand-subtitle {
    font-size: 0.68rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    display: block;
}

.sc-nav-container {
    padding: 0.75rem 0.6rem 1.5rem 0.6rem;
    overflow-y: auto;
    flex-grow: 1;
}

/* Custom Slim Scrollbar for Sidebar */
.sc-nav-container::-webkit-scrollbar {
    width: 5px;
}
.sc-nav-container::-webkit-scrollbar-track {
    background: transparent;
}
.sc-nav-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}
.sc-nav-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Standalone / Overview Nav Link (e.g. Dashboard) */
.sc-overview-link {
    color: #cbd5e1 !important;
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 8px;
    transition: all 0.15s ease;
    text-decoration: none;
    margin-bottom: 0.65rem;
    border: 1px solid transparent;
}

.sc-overview-link i {
    font-size: 1.1rem;
    color: #60a5fa;
}

.sc-overview-link:hover {
    background-color: var(--sc-sidebar-hover);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.06);
}

.sc-overview-link.active {
    background: var(--sc-sidebar-active-bg);
    color: var(--sc-sidebar-active-color) !important;
    border-left: 3px solid var(--sc-sidebar-active-border);
    box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.08);
}

/* Collapsible Group Container */
.sc-group-wrapper {
    margin-bottom: 0.35rem;
}

/* Group Header Button (Accordion Trigger) */
.sc-group-header {
    width: 100%;
    color: #cbd5e1;
    background: transparent;
    border: none;
    padding: 0.52rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 7px;
    transition: all 0.18s ease;
    text-align: left;
    cursor: pointer;
}

.sc-group-header:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.sc-group-header:focus {
    outline: none;
    box-shadow: none;
}

.sc-group-header .sc-group-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 700;
}

.sc-group-header:hover .sc-group-title {
    color: #e2e8f0;
}

.sc-group-header .sc-group-icon {
    font-size: 0.95rem;
    width: 22px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sc-group-header .sc-chevron {
    font-size: 0.72rem;
    color: #64748b;
    transition: transform 0.25s ease, color 0.2s ease;
}

.sc-group-header:not(.collapsed) .sc-chevron {
    transform: rotate(180deg);
    color: #94a3b8;
}

.sc-group-header:not(.collapsed) .sc-group-title {
    color: #f1f5f9;
}

/* Submenu Items Inside Groups */
.sc-sub-nav {
    padding-left: 0.35rem;
    margin: 0.15rem 0 0.45rem 0.75rem;
    border-left: 1px dashed rgba(255, 255, 255, 0.12);
}

.sc-sub-nav .nav-item {
    margin-bottom: 0.12rem;
}

.sc-sub-nav .nav-link {
    color: var(--sc-sidebar-color);
    padding: 0.42rem 0.8rem;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: 6px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.sc-sub-nav .nav-link i {
    font-size: 0.95rem;
    opacity: 0.85;
}

.sc-sub-nav .nav-link:hover:not(.disabled) {
    background-color: var(--sc-sidebar-hover);
    color: var(--sc-sidebar-hover-color);
}

.sc-sub-nav .nav-link.active {
    background: var(--sc-sidebar-active-bg);
    color: var(--sc-sidebar-active-color) !important;
    font-weight: 600;
    border-left: 3px solid var(--sc-sidebar-active-border);
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.08);
}

.sc-sub-nav .nav-link.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sc-sub-nav .nav-link.sc-nav-disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: auto !important;
    color: #64748b !important;
    user-select: none;
}

.sc-sub-nav .nav-link.sc-nav-disabled:hover {
    background-color: transparent !important;
    color: #64748b !important;
}

/* Main Layout */
.sc-main-wrapper {
    margin-left: var(--sc-sidebar-width);
    width: calc(100% - var(--sc-sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease-in-out, width 0.25s ease-in-out;
}

.sc-topbar {
    height: var(--sc-topbar-height);
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.sc-content {
    flex-grow: 1;
}

/* Card Styling */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

/* Responsive Sidebar Behaviors */
@media (max-width: 991.98px) {
    .sc-sidebar {
        transform: translateX(-100%);
    }

    .sc-sidebar.show {
        transform: translateX(0);
    }

    .sc-main-wrapper {
        margin-left: 0;
        width: 100%;
    }
}

/* Number input spinners removal for tabular numeric inputs */
.ot-hours::-webkit-inner-spin-button,
.ot-hours::-webkit-outer-spin-button,
.no-spin::-webkit-inner-spin-button,
.no-spin::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.ot-hours,
.no-spin {
    -moz-appearance: textfield;
    appearance: textfield;
}
