body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --depogram-brand: #007F73;
    --depogram-brand-dark: #0C5249;
    --depogram-accent: #3157D5;
    --depogram-signal: #A7C957;
    --depogram-ink: #132A32;
    --depogram-surface: #F6F8F7;
    --depogram-border: #E4E9E8;
    --primary-color: var(--depogram-brand);
    --secondary-color: #ffffff;
}

[data-bs-theme="dark"] {
    --primary-color: #ffffff;
    --secondary-color: #000000;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2d3139 !important;
}

.theme-toggle {
    position: fixed;
    top: 40px;
    z-index: 1000;
	float: right;
    margin-left: 30px;
}

.sidebar {
    height: 100vh;
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    padding: 1rem;
    border-right: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar .nav {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.25rem;
}

.sidebar .mt-auto {
    flex: 0 0 auto;
}

.portal-mobile-topbar,
.sidebar-backdrop {
    display: none;
}

.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
}

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    padding: 0.75rem 1rem 0.25rem;
    margin-top: 0.5rem;
    opacity: 0.6;
}

.nav-link {
    color: var(--bs-body-color);
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 0.875rem;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--depogram-brand-dark);
    color: white;
}

[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link.active {
    background-color: var(--bs-light);
    color: black;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--depogram-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.user-avatar-lg {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 2rem;
}

[data-bs-theme="dark"] .logo-icon {
    background: var(--depogram-brand);
    color: #ffffff;
}

.chart-container {
    background: var(--bs-body-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--bs-border-color);
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

.counting-card,
.report-card,
.user-card,
.staff-card,
.branch-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
    cursor: pointer;
}

.counting-card:hover,
.report-card:hover,
.user-card:hover,
.staff-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.report-card:hover {
    transform: translateY(-3px);
}

[data-bs-theme="dark"] .counting-card:hover,
[data-bs-theme="dark"] .report-card:hover,
[data-bs-theme="dark"] .user-card:hover,
[data-bs-theme="dark"] .staff-card:hover {
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

.stat-card {
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: transform 0.3s;
    border: none;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.terminal-icon,
.report-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.report-icon {
    margin-bottom: 1rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.category-icon-small {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.product-icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.product-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.product-list-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.product-list-item:last-child {
    border-bottom: none;
}

#ProductListOther .category-row {
    transform: none !important;
}

#ProductListOther .category-row:hover {
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-left: 5px;
}

.product-row,
.category-row,
.branches-row {
    border-radius: 12px;
    padding: 8px 15px;
    transition: all 0.3s;
    border: 1px solid var(--bs-border-color);
    margin-bottom: 0.75rem;
    background: var(--bs-body-bg);
}

.product-row:hover,
.category-row:hover,
.branches-row:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

[data-bs-theme="dark"] .product-row:hover,
[data-bs-theme="dark"] .category-row:hover,
[data-bs-theme="dark"] .branches-row:hover {
    box-shadow: 0 2px 8px rgba(255,255,255,0.1);
}

.product-row:last-child {
    border-bottom: none;
}

.loss-item,
.product-rank-item {
    padding: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    transition: all 0.3s;
}

.loss-item:hover,
.product-rank-item:hover {
    background: var(--bs-secondary-bg);
}

.loss-item:last-child,
.product-rank-item:last-child {
    border-bottom: none;
}

.product-rank-item {
    display: flex;
    align-items: center;
}

.product-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stock-item {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
}

.stock-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

[data-bs-theme="dark"] .stock-item:hover {
    box-shadow: 0 2px 8px rgba(255,255,255,0.1);
}

.info-box {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 2rem;
}

[data-bs-theme="dark"] .login-container {
    background: #0d1117;
}

.login-wrapper {
    display: flex;
    max-width: 1100px;
    width: 100%;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

[data-bs-theme="dark"] .login-wrapper {
    background: #161b22;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, #000000 0%, #434343 100%);
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .login-left {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    color: #000000;
}

.login-left::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -100px;
    left: -100px;
}

[data-bs-theme="dark"] .login-left::before {
    background: rgba(0,0,0,0.05);
}

.login-left::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    bottom: -50px;
    right: -50px;
}

[data-bs-theme="dark"] .login-left::after {
    background: rgba(0,0,0,0.03);
}

.login-left-content {
    position: relative;
    z-index: 1;
}

.login-card {
    flex: 1;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #6c757d;
    margin-bottom: 2rem;
}

.social-login {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.social-btn:hover {
    background: var(--bs-secondary-bg);
    transform: translateY(-2px);
}

.search-box {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--bs-border-color);
}

.search-box:focus {
    border-color: var(--depogram-brand);
    box-shadow: 0 0 0 0.2rem rgba(0,127,115,0.12);
}

[data-bs-theme="dark"] .search-box:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.1);
}

.form-control,
.form-select {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--bs-border-color);
}

.form-control:focus {
    border-color: var(--depogram-brand);
    box-shadow: 0 0 0 0.2rem rgba(0,127,115,0.12);
}

[data-bs-theme="dark"] .form-control:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.1);
}

.btn-add,
.btn-login {
    background: var(--depogram-brand);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
}

.btn-add:hover,
.btn-login:hover {
    background: var(--depogram-brand-dark);
    color: white;
}

[data-bs-theme="dark"] .btn-add,
[data-bs-theme="dark"] .btn-login {
    background: #ffffff;
    color: #000000;
}

[data-bs-theme="dark"] .btn-add:hover,
[data-bs-theme="dark"] .btn-login:hover {
    background: #e0e0e0;
}

.modal-content {
    border-radius: 16px;
    border: none;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-dialog {
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    display: flex;
    align-items: stretch;
}

.modal-dialog-centered {
    min-height: 0;
    align-items: center;
}

.modal-content > form {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.modal-header,
.modal-footer {
    flex: 0 0 auto;
}

.modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 576px) {
    .modal-dialog {
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .modal-content {
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
    }
}

.color-picker {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid var(--bs-border-color);
    cursor: pointer;
}

.stat-badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.rfid-badge {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

[data-bs-theme="dark"] .rfid-badge {
    background: #2d3139;
}

.permission-badge {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    margin: 0.2rem;
}

.device-card {
    border: 1px solid var(--depogram-border);
    border-radius: 8px;
    padding: 14px;
    background: var(--bs-body-bg);
    min-height: 112px;
}

.device-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    margin-top: 10px;
}

.device-status span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.device-status.online {
    color: #2e7d32;
    background: #e8f5e9;
}

.device-status.online span {
    background: #2e7d32;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12);
}

.device-status.offline {
    color: #b42318;
    background: #fff1f0;
}

.device-status.offline span {
    background: #d92d20;
    box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.12);
}

.rank-number {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 1rem;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #000;
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e8a87c 100%);
    color: #fff;
}

.rank-other {
    background: var(--bs-secondary-bg);
}

.staff-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

@media (max-width: 768px) {
    body.portal-menu-open {
        overflow: hidden;
    }

    .portal-mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 1030;
        height: 62px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0 1rem;
        background: var(--bs-body-bg);
        border-bottom: 1px solid var(--bs-border-color);
        box-shadow: 0 6px 18px rgba(19, 42, 50, 0.06);
    }

    .portal-menu-toggle,
    .portal-mobile-logout {
        width: 40px;
        height: 40px;
        border: 1px solid var(--bs-border-color);
        border-radius: 8px;
        background: var(--bs-body-bg);
        color: var(--bs-body-color);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        flex: 0 0 auto;
    }

    .portal-menu-toggle {
        width: auto;
        min-width: 82px;
        gap: 0.4rem;
        font-weight: 600;
    }

    .portal-menu-toggle i {
        font-size: 1.35rem;
        line-height: 1;
    }

    .portal-mobile-logo {
        width: 132px;
        max-height: 38px;
        object-fit: contain;
    }

    .sidebar {
        width: min(286px, 86vw);
        position: fixed;
        top: 0;
        left: 0;
        min-height: 100vh;
        z-index: 1040;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        box-shadow: 18px 0 40px rgba(19, 42, 50, 0.16);
    }

    body.portal-menu-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1035;
        background: rgba(19, 42, 50, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body.portal-menu-open .sidebar-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.25rem;
    }
    
    .login-left {
        display: none;
    }
    
    .login-card {
        padding: 2rem;
    }
}

.report-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
    height: 100%;
    text-decoration: none;
    color: inherit;
    display: block;
}

.report-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

[data-bs-theme="dark"] .report-card:hover {
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

.report-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

#satisGrafik {
	width: 100%;
	height: 300px;
	background: #fff;
	border-radius: 8px;
	padding: 10px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#dashboardstyle .chart-wrapper {
	width: 100%;
	height: auto;
	min-height: 300px;
	}

#satisGrafik,
#sayimDurumuGrafik {
	width: 100%;
	height: 300px;
}

.portal-list-card {
    border: 1px solid rgba(23, 32, 38, 0.08) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(23, 32, 38, 0.05) !important;
    overflow: hidden;
}

.portal-list-card .table {
    margin-bottom: 0;
}

.portal-list-card .table thead th {
    background: #f6f8f7;
    border-bottom: 1px solid rgba(23, 32, 38, 0.08);
    color: #5f6b66;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
    padding-top: 0.82rem;
    padding-bottom: 0.82rem;
}

.portal-list-card .table tbody td {
    border-color: rgba(23, 32, 38, 0.06);
    padding-top: 0.82rem;
    padding-bottom: 0.82rem;
    vertical-align: middle;
}

.portal-list-card .table tbody tr:hover {
    background: rgba(19, 162, 50, 0.035);
}

.portal-list-card .btn-sm {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.portal-list-card .badge {
    border-radius: 6px;
    font-weight: 600;
}

@media (max-width: 768px) {
	.edocument-lines-wrap {
		overflow: visible;
	}

	.edocument-lines,
	.edocument-lines tbody {
		display: block;
		width: 100%;
	}

	.edocument-lines thead {
		display: none;
	}

	.edocument-lines tr {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 0.75rem;
		margin-bottom: 0.85rem;
		padding: 1rem;
		border: 1px solid rgba(23, 32, 38, 0.1);
		border-radius: 0.75rem;
		background: #fff;
	}

	.edocument-lines td {
		display: block;
		min-width: 0;
		padding: 0;
		border: 0;
	}

	.edocument-lines td[data-label]::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 0.35rem;
		color: #6c757d;
		font-size: 0.75rem;
		font-weight: 600;
	}

	.edocument-lines .edocument-line-product {
		grid-column: 1 / -1;
	}

	.edocument-lines .edocument-line-total {
		text-align: left !important;
	}

	.edocument-lines .edocument-line-action {
		display: flex;
		align-items: end;
		justify-content: end;
	}

	#satisGrafik,
	#sayimDurumuGrafik {
		height: 250px;
	}

	#dashboardstyle .chart-container {
		margin-bottom: 20px;
	}

	#dashboardstyle .g-4 {
		display: block;
	}

	#dashboardstyle .col-md-8, #dashboardstyle .col-md-4 {
		width: 100% !important;
	}
}
