:root {
    --gcs-blue: #0d6efd;
    --gcs-navy: #0f1f3d;
    --gcs-deep: #081426;
    --gcs-bg: #f4f7fb;
    --gcs-border: #dce4ef;
}

body {
    background: var(--gcs-bg);
    color: #172033;
    font-family: Arial, Helvetica, sans-serif;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, var(--gcs-deep), var(--gcs-navy));
    color: #fff;
    flex: 0 0 260px;
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    padding: 18px 14px;
    position: sticky;
    top: 0;
}

.brand {
    align-items: center;
    color: #fff;
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    text-decoration: none;
}

.brand img,
.sidebar-logo {
    background: #fff;
    border-radius: 8px;
    height: 42px;
    max-height: 42px;
    max-width: 42px;
    object-fit: contain;
    padding: 5px;
    width: 42px;
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.1;
}

.brand small {
    color: #b9c7dd;
}

.sidebar-group {
    margin-bottom: 8px;
}

.sidebar-group-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #90a8ca;
    display: flex;
    font-size: 0.76rem;
    font-weight: 700;
    justify-content: space-between;
    letter-spacing: 0;
    margin: 4px 0;
    padding: 9px 10px;
    text-transform: uppercase;
    width: 100%;
}

.sidebar-group-toggle:hover,
.sidebar-group-toggle:not(.collapsed) {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-chevron {
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform 0.18s ease;
}

.sidebar-group-toggle.collapsed .sidebar-chevron {
    transform: rotate(0deg);
}

.sidebar-dashboard-link {
    margin-bottom: 12px;
}

.sidebar-group-links {
    padding-left: 8px;
}

.sidebar-nav .nav-link {
    border-radius: 8px;
    color: #c9d5e8;
    font-weight: 600;
    margin-bottom: 4px;
    padding: 10px 12px;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(13, 110, 253, 0.22);
    color: #fff;
}

.content-wrap {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    align-items: center;
    background: linear-gradient(90deg, #0f2d57, #0d6efd);
    color: #fff;
    display: flex;
    justify-content: space-between;
    min-height: 86px;
    padding: 18px 28px;
}

.topbar h1 {
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0;
}

.eyebrow {
    color: #d7e6ff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.topbar-user {
    align-items: center;
    display: flex;
    gap: 12px;
    white-space: nowrap;
}

.sync-meta {
    color: #e6f0ff;
    font-size: 0.84rem;
}

.sync-pulse {
    animation: syncPulse 1.2s infinite;
}

@keyframes syncPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.main-content {
    flex: 1;
    padding: 28px;
}

.stat-card,
.module-panel,
.table-panel {
    background: #fff;
    border: 1px solid var(--gcs-border);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(15, 31, 61, 0.06);
}

.stat-card {
    min-height: 130px;
    position: relative;
    padding: 20px;
}

.dashboard-stat-card {
    border-left: 5px solid var(--accent, var(--gcs-blue));
}

.stat-card-top {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stat-card-icon {
    align-items: center;
    background: color-mix(in srgb, var(--accent, var(--gcs-blue)) 14%, #fff);
    border: 1px solid color-mix(in srgb, var(--accent, var(--gcs-blue)) 30%, #fff);
    border-radius: 50%;
    color: var(--accent, var(--gcs-blue));
    display: inline-flex;
    font-weight: 800;
    flex: 0 0 auto;
    font-size: 0.72rem;
    height: 42px;
    justify-content: center;
    line-height: 1;
    margin-bottom: 0;
    min-width: 42px;
    padding: 0 9px;
    text-align: center;
    width: auto;
}

.report-card-icon {
    min-width: 58px;
}

.stat-card span {
    color: #66758c;
    display: block;
    font-size: 0.92rem;
    margin-bottom: 10px;
}

.stat-card .stat-card-icon {
    color: var(--accent, var(--gcs-blue));
    display: inline-flex;
    font-size: 0.72rem;
    margin-bottom: 0;
}

.logo-preview-box,
.avatar-preview-box {
    align-items: center;
    background: #fff;
    border: 1px solid var(--gcs-border);
    border-radius: 8px;
    display: inline-flex;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

.logo-preview-box {
    height: 120px;
    max-height: 120px;
    max-width: 180px;
    width: 180px;
}

.settings-logo-preview img,
.settings-logo-preview {
    max-height: 120px;
    max-width: 180px;
    object-fit: contain;
}

.topbar-logo {
    height: 40px;
    max-height: 40px;
    max-width: 40px;
    object-fit: contain;
    width: 40px;
}

.print-logo {
    height: 70px;
    max-height: 70px;
    max-width: 90px;
    object-fit: contain;
    width: 90px;
}

.profile-avatar-lg,
.user-avatar-md,
.user-avatar-sm,
.topbar-avatar {
    background: #eef3f9;
    border: 1px solid var(--gcs-border);
    border-radius: 50%;
    display: inline-block;
    object-fit: cover;
    overflow: hidden;
}

.profile-avatar-lg {
    height: 120px;
    width: 120px;
}

.user-avatar-md {
    height: 96px;
    width: 96px;
}

.user-avatar-sm {
    height: 40px;
    width: 40px;
}

.topbar-profile {
    align-items: center;
    color: #fff;
    display: inline-flex;
    gap: 8px;
    text-decoration: none;
}

.topbar-profile:hover {
    color: #fff;
}

.topbar-profile img,
.topbar-avatar {
    background: #fff;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    height: 32px;
    max-height: 32px;
    max-width: 32px;
    object-fit: cover;
    width: 32px;
}

.searchable-select-wrap {
    position: relative;
}

.searchable-select-search {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    font-size: 0.86rem;
}

.pagination-wrap {
    background: #fbfdff;
}

.pagination-per-page {
    min-width: 76px;
}

.stat-card strong {
    color: var(--gcs-navy);
    display: block;
    font-size: 2rem;
}

.stat-card small {
    color: #7a8798;
}

.stat-card-icon {
    align-items: center;
    background: color-mix(in srgb, var(--accent, #0d6efd) 14%, white);
    border: 1px solid color-mix(in srgb, var(--accent, #0d6efd) 22%, white);
    border-radius: 50%;
    color: var(--accent, #0d6efd);
    display: inline-flex;
    flex: 0 0 42px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.stat-card-icon svg {
    height: 22px;
    width: 22px;
}

.report-card-icon {
    --accent: #0d6efd;
    flex-basis: 44px;
    height: 44px;
    width: 44px;
}

.module-panel {
    padding: 28px;
}

.table-panel {
    overflow: hidden;
}

.table-panel .table {
    margin-bottom: 0;
}

.table th {
    color: #4d5f78;
    font-size: 0.82rem;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.badge {
    font-weight: 700;
}

.product-table {
    font-size: 0.86rem;
    min-width: 1650px;
}

.detail-list dt {
    color: #66758c;
    font-weight: 700;
}

.detail-list dd {
    margin-bottom: 0.65rem;
}

.product-thumb {
    background: #eef3f9;
    border: 1px solid var(--gcs-border);
    border-radius: 8px;
    height: 54px;
    object-fit: cover;
    width: 72px;
}

.product-image-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.product-image-card {
    border: 1px solid var(--gcs-border);
    border-radius: 8px;
    padding: 10px;
}

.product-image-card img {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    object-fit: cover;
    width: 100%;
}

.primary-product-image {
    background: #eef3f9;
    border: 1px solid var(--gcs-border);
    border-radius: 8px;
    max-height: 360px;
    object-fit: contain;
    width: 100%;
}

.login-page {
    align-items: center;
    background: linear-gradient(135deg, #081426, #0d6efd);
    display: flex;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.22);
    margin: auto;
    max-width: 430px;
    padding: 30px;
    width: 100%;
}

.login-logo {
    display: block;
    height: 90px;
    margin: 0 auto 16px;
    max-height: 90px;
    max-width: 90px;
    object-fit: contain;
    width: 90px;
}

.access-denied-panel {
    margin: 0 auto;
    max-width: 680px;
}

.access-denied-code {
    background: #fff1f2;
    border: 1px solid #ffd2d8;
    border-radius: 8px;
    color: #b02a37;
    display: inline-block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 14px;
    padding: 12px 18px;
}

@media (max-width: 900px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        height: auto;
        min-height: auto;
        position: static;
    }

    .sidebar-nav {
        display: block;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }
}
