:root {
    --ituzastock-navy: #061b3a;
    --ituzastock-navy-soft: #0a2247;
    --ituzastock-blue: #1768e5;
    --ituzastock-sky: #dcecff;
    --ituzastock-ink: #122033;
    --ituzastock-ink-soft: #5a6d86;
    --ituzastock-panel: #ffffff;
    --ituzastock-bg: #f5f8fd;
    --ituzastock-line: #e1e8f2;
    --ituzastock-success: #157347;
    --ituzastock-danger: #b42318;
    --ituzastock-warning: #b54708;
    --ituzastock-violet: #7b61ff;
}

body {
    background:
        radial-gradient(circle at top right, rgba(23, 104, 229, 0.14), transparent 22%),
        linear-gradient(180deg, #fbfdff, var(--ituzastock-bg));
    color: var(--ituzastock-ink);
    min-height: 100vh;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

.sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--ituzastock-navy), #041229 78%);
    color: #fff;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.main-content {
    width: 100%;
}

@media (min-width: 992px) {
    .main-content {
        margin-left: 260px;
        width: calc(100% - 260px);
    }
}

.sidebar-scroll {
    flex: 1 1 auto;
    padding: 1rem 1rem 1.4rem;
    overflow-y: auto;
}

.brand-block {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    color: #fff;
    padding: 1rem 0.35rem 1.25rem;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #3f8cff, #7db4ff);
    color: #081a30;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-mark-box {
    position: relative;
    background: linear-gradient(135deg, #1191ff, #1a63f1);
}

.brand-cube {
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 5px;
    transform: rotate(12deg);
    display: block;
    position: relative;
}

.brand-cube::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    opacity: 0.8;
}

.brand-name {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-tagline {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

.nav-section-title {
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 1.35rem 0 0.55rem;
    padding: 0 0.5rem;
    text-transform: uppercase;
}

.app-nav .nav-link {
    color: rgba(255, 255, 255, 0.82);
    border-radius: 12px;
    padding: 0.92rem 1rem;
    margin-bottom: 0.28rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
}

.app-nav .nav-link.active,
.app-nav .nav-link:hover {
    background: linear-gradient(90deg, rgba(23, 104, 229, 0.95), rgba(42, 123, 247, 0.85));
    color: #fff;
    box-shadow: 0 12px 28px rgba(23, 104, 229, 0.25);
}

.nav-icon {
    width: 18px;
    height: 18px;
    border: 1.8px solid currentColor;
    border-radius: 4px;
    opacity: 0.9;
    flex: 0 0 auto;
}

.sidebar-footer {
    flex: 0 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
    background: rgba(4, 18, 41, 0.96);
}

.user-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1rem;
}

.user-card-compact {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1e87ff, #7dc1ff);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.4rem;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(18, 32, 51, 0.08);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-menu {
    width: 42px;
    height: 42px;
    border: 1px solid var(--ituzastock-line);
    background: #fff;
    border-radius: 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.topbar-menu span {
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--ituzastock-navy);
}

.topbar-search {
    width: min(100%, 560px);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #fff;
    border: 1px solid var(--ituzastock-line);
    border-radius: 14px;
    padding: 0.88rem 1rem;
    box-shadow: 0 8px 24px rgba(11, 37, 69, 0.05);
}

.topbar-search input {
    width: 100%;
    border: 0;
    outline: none;
    color: var(--ituzastock-ink);
    background: transparent;
}

.topbar-search-icon,
.dashboard-hero-date-icon,
.topbar-chip-icon {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 4px;
    display: inline-block;
    opacity: 0.65;
}

.topbar-chip {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--ituzastock-line);
    background: #fff;
    gap: 0.7rem;
    align-items: center;
    color: var(--ituzastock-ink);
    font-weight: 600;
}

.topbar-icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--ituzastock-line);
    background: #fff;
    position: relative;
}

.topbar-badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #f04438;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.topbar-profile {
    padding-left: 0.2rem;
}

.topbar-profile-name {
    font-weight: 700;
}

.topbar-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.topbar-subtitle {
    color: #5c6f86;
    font-size: 0.95rem;
}

.topbar-profile-role {
    color: var(--ituzastock-ink-soft);
    font-size: 0.85rem;
}

.page-body {
    padding-top: 1.3rem;
    padding-bottom: 6rem;
}

.page-panel {
    background: var(--ituzastock-panel);
    border: 1px solid var(--ituzastock-line);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(11, 37, 69, 0.06);
    padding: 1.3rem;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--ituzastock-line);
    border-radius: 22px;
    padding: 1.25rem;
    box-shadow: 0 12px 26px rgba(11, 37, 69, 0.06);
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--ituzastock-navy);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-card {
    width: min(100%, 460px);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(19, 99, 223, 0.12);
    border-radius: 28px;
    box-shadow: 0 32px 90px rgba(11, 37, 69, 0.18);
    padding: 2rem;
}

.scanner-shell {
    max-width: 760px;
    margin: 0 auto;
}

.scanner-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.scanner-mode {
    border: 1px solid var(--ituzastock-line);
    border-radius: 18px;
    padding: 1rem;
    background: #fff;
    text-align: left;
    font-weight: 700;
}

.scanner-mode.active {
    border-color: var(--ituzastock-blue);
    background: #eaf3ff;
    color: var(--ituzastock-blue);
}

.scan-input {
    font-size: 1.35rem;
    padding: 1rem 1.1rem;
}

.scanner-status {
    min-height: 58px;
    border-radius: 18px;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid var(--ituzastock-line);
}

.large-tile {
    border-radius: 24px;
    border: 1px solid var(--ituzastock-line);
    background: linear-gradient(180deg, #fff, #f8fbff);
    padding: 1rem;
    height: 100%;
}

.table thead th {
    color: #516177;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.product-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--ituzastock-line);
}

.badge-soft {
    background: var(--ituzastock-sky);
    color: var(--ituzastock-blue);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #081a30;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1030;
}

.mobile-nav a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    padding: 0.9rem 0.5rem;
    text-align: center;
    font-size: 0.82rem;
}

.dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.3rem;
}

.dashboard-hero h1 {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
}

.dashboard-hero p {
    margin: 0.3rem 0 0;
    color: var(--ituzastock-ink-soft);
    font-size: 1rem;
}

.dashboard-hero-date {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: #fff;
    border: 1px solid var(--ituzastock-line);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    color: var(--ituzastock-ink);
    font-weight: 600;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.4rem;
}

.dashboard-kpi {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 1.4rem;
    border: 1px solid var(--ituzastock-line);
    background: #fff;
    box-shadow: 0 20px 50px rgba(11, 37, 69, 0.06);
}

.dashboard-kpi::after {
    content: "";
    position: absolute;
    inset: auto -40px -40px auto;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    opacity: 0.08;
}

.dashboard-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-kpi-label {
    font-size: 0.92rem;
    font-weight: 700;
}

.dashboard-kpi strong {
    font-size: 2rem;
    line-height: 1.05;
    display: block;
    margin-bottom: 0.45rem;
}

.dashboard-kpi p,
.dashboard-kpi small {
    display: block;
    color: var(--ituzastock-ink-soft);
}

.dashboard-kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.74);
}

.dashboard-kpi-blue {
    background: linear-gradient(135deg, rgba(56, 132, 255, 0.07), #fff);
}

.dashboard-kpi-blue .dashboard-kpi-label,
.dashboard-kpi-blue strong {
    color: #1768e5;
}

.dashboard-kpi-blue::after {
    background: #1768e5;
}

.dashboard-kpi-green {
    background: linear-gradient(135deg, rgba(39, 194, 129, 0.08), #fff);
}

.dashboard-kpi-green .dashboard-kpi-label,
.dashboard-kpi-green strong {
    color: #16875b;
}

.dashboard-kpi-green::after {
    background: #27c281;
}

.dashboard-kpi-amber {
    background: linear-gradient(135deg, rgba(255, 176, 32, 0.12), #fff);
}

.dashboard-kpi-amber .dashboard-kpi-label,
.dashboard-kpi-amber strong {
    color: #cb7b00;
}

.dashboard-kpi-amber::after {
    background: #ffb020;
}

.dashboard-kpi-red {
    background: linear-gradient(135deg, rgba(240, 68, 56, 0.08), #fff);
}

.dashboard-kpi-red .dashboard-kpi-label,
.dashboard-kpi-red strong {
    color: #d92d20;
}

.dashboard-kpi-red::after {
    background: #f04438;
}

.dashboard-panel {
    padding: 1.35rem;
}

.dashboard-panel-subtitle {
    color: var(--ituzastock-ink-soft);
    font-size: 0.92rem;
}

.dashboard-filter-pill {
    background: #f7f9fc;
    border: 1px solid var(--ituzastock-line);
    color: var(--ituzastock-ink);
    border-radius: 12px;
    padding: 0.55rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.trend-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
    min-height: 260px;
    margin-top: 0.5rem;
}

.trend-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.trend-bar-track {
    width: 100%;
    min-height: 190px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f7fbff, #edf4fb);
    border: 1px solid var(--ituzastock-line);
    display: flex;
    align-items: flex-end;
    padding: 0.55rem;
}

.trend-bar-fill {
    width: 100%;
    border-radius: 12px;
    background: linear-gradient(180deg, #86c4ff, #1768e5);
    box-shadow: 0 12px 30px rgba(23, 104, 229, 0.18);
}

.trend-bar-value {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ituzastock-navy);
}

.trend-bar-label {
    font-size: 0.82rem;
    color: var(--ituzastock-ink-soft);
}

.warehouse-split {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    align-items: center;
    min-height: 280px;
}

.warehouse-donut {
    width: 220px;
    height: 220px;
    border-radius: 999px;
    position: relative;
    display: grid;
    place-items: center;
    margin: 0 auto;
}

.warehouse-donut::before {
    content: "";
    width: 116px;
    height: 116px;
    border-radius: 999px;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--ituzastock-line);
}

.warehouse-donut-center {
    position: absolute;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.warehouse-donut-center span {
    font-size: 0.85rem;
    color: var(--ituzastock-ink-soft);
}

.warehouse-donut-center strong {
    font-size: 1.35rem;
    color: var(--ituzastock-navy);
}

.warehouse-breakdown-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.warehouse-breakdown-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-top: 0.45rem;
    flex: 0 0 auto;
}

.dashboard-alert-list,
.movement-feed,
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.dashboard-alert-item,
.activity-feed-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid #eef2f7;
}

.dashboard-alert-item:last-child,
.activity-feed-item:last-child {
    border-bottom: 0;
}

.dashboard-alert-icon,
.activity-feed-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f8fd, #e8f0fb);
    border: 1px solid var(--ituzastock-line);
    flex: 0 0 auto;
}

.dashboard-alert-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dashboard-alert-copy span {
    color: var(--ituzastock-ink-soft);
    font-size: 0.84rem;
}

.dashboard-alert-pill {
    background: #fff1f1;
    color: #e11d48;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.summary-card {
    border: 1px solid var(--ituzastock-line);
    border-radius: 16px;
    padding: 1rem;
    background: linear-gradient(180deg, #f7fdf9, #fff);
}

.summary-card span,
.summary-card small {
    display: block;
}

.summary-card span {
    color: var(--ituzastock-ink-soft);
    margin-bottom: 0.4rem;
}

.summary-card strong {
    display: block;
    color: var(--ituzastock-navy);
    font-size: 1.35rem;
}

.summary-card small {
    color: var(--ituzastock-ink-soft);
    margin-top: 0.35rem;
}

.summary-card-soft-red {
    background: linear-gradient(180deg, #fff6f6, #fff);
}

.summary-card-soft-violet {
    background: linear-gradient(180deg, #f7f2ff, #fff);
}

.summary-card-soft-amber {
    background: linear-gradient(180deg, #fffaf0, #fff);
}

.movement-feed-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.9rem;
    align-items: center;
    padding: 0.95rem 0;
    border-bottom: 1px solid #eef2f7;
}

.movement-feed-item:last-child {
    border-bottom: 0;
}

.movement-type-badge {
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.movement-type-receive {
    background: #e8f9f0;
    color: #157347;
}

.movement-type-issue {
    background: #fff1f1;
    color: #d92d20;
}

.movement-type-transfer_out,
.movement-type-transfer_in {
    background: #edf4ff;
    color: #1768e5;
}

.movement-type-adjustment,
.movement-type-count {
    background: #fff8eb;
    color: #cb7b00;
}

.movement-feed-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.movement-feed-copy span,
.movement-feed-meta span {
    color: var(--ituzastock-ink-soft);
    font-size: 0.84rem;
}

.movement-feed-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dashboard-inline-link {
    color: var(--ituzastock-blue);
    font-weight: 700;
    text-decoration: none;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.quick-action-card {
    border-radius: 16px;
    border: 1px solid var(--ituzastock-line);
    padding: 1rem 1.15rem;
    text-decoration: none;
    font-weight: 700;
    color: var(--ituzastock-navy);
    background: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(11, 37, 69, 0.08);
}

.quick-action-green {
    background: linear-gradient(180deg, #effcf5, #fff);
}

.quick-action-red {
    background: linear-gradient(180deg, #fff4f4, #fff);
}

.quick-action-blue {
    background: linear-gradient(180deg, #f2f7ff, #fff);
}

.quick-action-violet {
    background: linear-gradient(180deg, #f6f1ff, #fff);
}

.quick-action-sky {
    background: linear-gradient(180deg, #eef8ff, #fff);
}

.quick-action-amber {
    background: linear-gradient(180deg, #fff8ee, #fff);
}

.activity-feed-item strong {
    display: block;
    margin-bottom: 0.2rem;
}

.print-only {
    display: none;
}

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

    .warehouse-split {
        grid-template-columns: 1fr;
        justify-items: center;
    }
}

@media (max-width: 991.98px) {
    .topbar {
        padding: 1rem;
    }

    .dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-kpi-grid,
    .summary-grid,
    .quick-action-grid {
        grid-template-columns: 1fr;
    }

    .movement-feed-item {
        grid-template-columns: 1fr;
    }

    .movement-feed-meta {
        text-align: left;
    }
}

@media print {
    .sidebar,
    .topbar,
    .mobile-nav,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        width: 100% !important;
    }

    .print-only {
        display: block;
    }
}
