/* Custom styling for admin panel */

/* Sidebar styles */
#sidebar-wrapper {
    min-height: 100vh;
    width: 250px;
    transition: margin 0.25s ease-out, width 0.25s ease-out;
    flex-shrink: 0;
    z-index: 100;
    position: fixed;
    left: 0;
}

#sidebar-wrapper .sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: -250px;
    width: 70px;
}

/* Main content styles */
#page-content-wrapper {
    min-width: 0;
    width: 100%;
    flex: 1;
    margin-left: 250px;
    transition: margin-left 0.25s ease-out;
}

#wrapper.toggled #page-content-wrapper {
    margin-left: 0;
}

/* Wrapper layout */
#wrapper {
    display: flex;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Welcome banner buttons */
.card.bg-gradient-primary .btn {
    min-width: auto;
    white-space: nowrap;
    margin-bottom: 0.5rem;
    border-radius: 50rem;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.card.bg-gradient-primary .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 576px) {
    .card.bg-gradient-primary .col-md-4 {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .card.bg-gradient-primary .btn {
        width: 100%;
        margin-right: 0 !important;
    }
}

/* Dashboard cards */
.dashboard-card {
    transition: all 0.3s;
    border-radius: 1rem;
    border-left: none;
    box-shadow: 0 0.3rem 1rem rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #fff 0%, #f8f9fc 100%);
    position: relative;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.7rem 2rem rgba(0, 0, 0, 0.15);
}

.dashboard-card-primary {
    border-top: 5px solid #4e73df;
}

.dashboard-card-success {
    border-top: 5px solid #1cc88a;
}

.dashboard-card-info {
    border-top: 5px solid #36b9cc;
}

.dashboard-card-warning {
    border-top: 5px solid #f6c23e;
}

.dashboard-card-danger {
    border-top: 5px solid #e74a3b;
}

.dashboard-card-secondary {
    border-top: 5px solid #858796;
}

/* Card icon */
.dashboard-card .card-icon {
    font-size: 2.5rem;
    opacity: 0.3;
    position: absolute;
    right: 1rem;
    bottom: 1rem;
}

/* Fix for collapsed sidebar */
#wrapper.toggled .sidebar-icon {
    margin-right: 0;
}

#wrapper.toggled .sidebar-nav .list-group-item span:not(.sidebar-icon):not(.sidebar-icon-sm) {
    display: none;
}

#wrapper.toggled .sidebar-nav .list-group-item .sidebar-icon,
#wrapper.toggled .sidebar-nav .list-group-item .sidebar-icon-sm {
    margin-right: 0;
}

#wrapper.toggled .sidebar-nav .list-group-item {
    text-align: center;
    padding: 1rem 0.5rem;
    display: flex;
    justify-content: center;
}

#wrapper.toggled .sidebar-nav .list-group-item [class*="fa-chevron"] {
    display: none;
}

#wrapper.toggled .sidebar-heading div {
    display: none;
}

#wrapper.toggled .sidebar-heading img {
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    #sidebar-wrapper {
        margin-left: -250px;
        position: fixed;
        z-index: 1000;
    }
    
    #page-content-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
        width: 250px;
    }
    
    #wrapper.toggled .sidebar-nav .list-group-item span:not(.sidebar-icon):not(.sidebar-icon-sm) {
        display: inline;
    }
    
    #wrapper.toggled .sidebar-heading div {
        display: block;
    }
    
    #wrapper.toggled .sidebar-nav .list-group-item {
        text-align: left;
        padding-left: 1.5rem;
        display: block;
    }
    
    #wrapper.toggled .sidebar-nav .list-group-item [class*="fa-chevron"] {
        display: inline-block;
    }
    
    #wrapper.toggled #page-content-wrapper {
        margin-left: 0;
    }
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }
    
    #page-content-wrapper {
        min-width: 0;
    }
    
    #wrapper.toggled #sidebar-wrapper {
        margin-left: calc(var(--sidebar-width) * -1);
    }
    
    #wrapper.toggled #page-content-wrapper {
        margin-left: 0;
    }
}

@media (max-width: 992px) {
    #sidebar-wrapper {
        margin-left: calc(var(--sidebar-width) * -1);
    }
    
    #page-content-wrapper {
        margin-left: 0;
    }
    
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
    
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

/* Table styles */
.table-responsive {
    overflow-x: auto;
}

.table-actions .btn {
    margin-right: 5px;
}

/* Compact table styles for stock cards */
.table-compact th, 
.table-compact td {
    padding: 0.5rem 0.5rem;
    font-size: 0.875rem;
    vertical-align: middle;
}

.table-compact .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Stok kodları özel stilleri */
.stock-code-label {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: #4e73df;
    color: white;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
    display: inline-block;
    min-width: 70px;
    text-align: center;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stock-status-active {
    background-color: #1cc88a;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3em 0.65em;
    border-radius: 0.25rem;
    display: inline-block;
}

.stock-status-passive {
    background-color: #e74a3b;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3em 0.65em;
    border-radius: 0.25rem;
    display: inline-block;
}

.stock-level-critical {
    background-color: #e74a3b;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25em 0.5em;
    border-radius: 0.25rem;
    display: inline-block;
    margin-left: 0.5rem;
}

/* DataTables custom styling */
.dataTables_wrapper .dataTables_length, 
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.5rem;
}

.dataTables_wrapper .dataTables_length select {
    min-width: 60px;
}

/* Filter styles */
.card-filter {
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f8f9fc;
    border-radius: 0.35rem;
    border-left: 0.25rem solid #4e73df;
}

/* Form styles */
.form-required::after {
    content: '*';
    color: #e74a3b;
    margin-left: 3px;
}

/* Status badges */
.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    white-space: nowrap;
    font-weight: 500;
}

.status-pending {
    background-color: #f8f9fc;
    color: #4e73df;
    border: 1px solid #4e73df;
}

.status-approved {
    background-color: #e6f8f1;
    color: #1cc88a;
    border: 1px solid #1cc88a;
}

.status-completed {
    background-color: #e6f8f1;
    color: #1cc88a;
    border: 1px solid #1cc88a;
}

.status-rejected {
    background-color: #fdeded;
    color: #e74a3b;
    border: 1px solid #e74a3b;
}

.status-scheduled {
    background-color: #fff9e6;
    color: #f6c23e;
    border: 1px solid #f6c23e;
}

.status-in-progress {
    background-color: #e6f3f8;
    color: #36b9cc;
    border: 1px solid #36b9cc;
}

.status-cancelled {
    background-color: #f8f9fc;
    color: #858796;
    border: 1px solid #858796;
}

/* Utility classes */
.cursor-pointer {
    cursor: pointer;
}

/* Timeline for request history */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: #e9ecef;
}

.timeline-item {
    padding-bottom: 20px;
    position: relative;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: -30px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #4e73df;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #4e73df;
}

.timeline-item.approved:before {
    background-color: #1cc88a;
    box-shadow: 0 0 0 2px #1cc88a;
}

.timeline-item.rejected:before {
    background-color: #e74a3b;
    box-shadow: 0 0 0 2px #e74a3b;
}

.timeline-item.pending:before {
    background-color: #f6c23e;
    box-shadow: 0 0 0 2px #f6c23e;
}

.timeline-date {
    font-size: 0.8rem;
    color: #858796;
}

/* Notification styling */
.notification-unread {
    background-color: #f8f9fc;
}

/* Custom button styles */
.btn-outline-purple {
    color: #6f42c1;
    border-color: #6f42c1;
}

.btn-outline-purple:hover {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}

.btn-purple {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}

.btn-purple:hover {
    color: #fff;
    background-color: #5d36a4;
    border-color: #5d36a4;
}

/* Login page */
.login-page {
    background-color: #f8f9fc;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    max-width: 400px;
    width: 100%;
}

.login-card {
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

.login-card .card-header {
    background-color: #4e73df;
    color: white;
    text-align: center;
    border-radius: 10px 10px 0 0;
    padding: 1.5rem;
}

.login-card .card-header h4 {
    margin-bottom: 0;
}

.login-card .card-body {
    padding: 2rem;
}

/* Print styles */
@media print {
    #sidebar-wrapper, .navbar, .footer, .no-print {
        display: none !important;
    }
    
    #page-content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .container-fluid {
        padding: 0 !important;
    }
    
    .card {
        border: none !important;
    }
    
    .card-header {
        background-color: transparent !important;
        color: #000 !important;
        border-bottom: 1px solid #ddd !important;
    }
} 

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    max-width: 440px;
    width: 100%;
    animation: fadeIn 0.6s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.login-card .card-header {
    background: #4e73df;
    color: white;
    padding: 20px;
    text-align: center;
    border-bottom: none;
}
.login-card .card-body {
    padding: 30px;
}
.btn-login {
    padding: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
}
.input-group-text {
    background-color: #f8f9fc;
    border: none;
    color: #4e73df;
}
.form-control {
    padding: 12px;
    height: auto;
}
.form-control:focus {
    box-shadow: none;
    border-color: #4e73df;
}
.forgot-link {
    color: #4e73df;
    transition: all 0.3s;
    text-decoration: none;
    font-weight: 500;
}
.forgot-link:hover {
    color: #224abe;
    text-decoration: underline;
}
.social-btn {
    padding: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}
.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.app-logo {
    height: 60px;
    margin-bottom: 15px;
}
.alert {
    border-radius: 8px;
    border: none;
}

/* Main CSS File */

/* Variables */
:root {
    --primary-color: #4e73df;
    --primary-dark: #224abe;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --sidebar-width: 250px;
}

/* General */
body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fc;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Wrapper */
#wrapper {
    display: flex;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: calc(var(--sidebar-width) * -1);
}

#sidebar-wrapper {
    min-height: 100vh;
    width: var(--sidebar-width);
    transition: margin 0.25s ease-out;
    flex-shrink: 0;
    z-index: 100;
}

#page-content-wrapper {
    min-width: 0; /* Allow content to shrink */
    width: 100%;
    flex: 1;
}

/* Status Badges */
.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 50rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
}

.status-pending {
    background-color: var(--warning-color);
    color: #212529;
}

.status-approved {
    background-color: var(--success-color);
}

.status-completed {
    background-color: var(--primary-color);
}

.status-rejected {
    background-color: var(--danger-color);
}

.status-scheduled {
    background-color: var(--info-color);
}

.status-in-progress {
    background-color: #6f42c1; /* purple */
}

.status-cancelled {
    background-color: #343a40; /* dark */
}

/* Custom Card Styles */
.dashboard-card {
    position: relative;
    overflow: hidden;
}

.dashboard-card .card-body {
    z-index: 10;
    position: relative;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    transition: all 0.3s ease;
}

.dashboard-card-primary::before {
    background-color: var(--primary-color);
}

.dashboard-card-success::before {
    background-color: var(--success-color);
}

.dashboard-card-info::before {
    background-color: var(--info-color);
}

.dashboard-card-warning::before {
    background-color: var(--warning-color);
}

.dashboard-card-danger::before {
    background-color: var(--danger-color);
}

.dashboard-card-secondary::before {
    background-color: var(--secondary-color);
}

.dashboard-card .card-icon {
    opacity: 0.2;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    z-index: 0;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
}

.login-card .card-body {
    padding: 3rem;
}

.login-form .form-control {
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    height: auto;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.login-form .form-control:focus {
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.25);
    border-color: #bac8f3;
}

.login-form .input-group-text {
    background-color: #f8f9fc;
    border-right: none;
    border-radius: 0.5rem 0 0 0.5rem;
}

.login-form .form-control {
    border-left: none;
    border-radius: 0 0.5rem 0.5rem 0;
}

.login-form .btn-primary {
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    border: none;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.login-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.login-form .btn-primary:active {
    transform: translateY(1px);
}

/* Sidebar */
.sidebar-nav .list-group-item.active {
    color: #4e73df;
    font-weight: 600;
}

.sidebar-nav .list-group-item {
    color: #5a5c69;
    border-radius: 0;
    transition: all 0.2s;
}

.sidebar-nav .list-group-item:hover {
    background-color: #f8f9fc;
    transform: translateX(3px);
}

.sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

/* Buttons */
.btn {
    border-radius: 50rem;
    padding: 0.5rem 1.2rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
}

/* Icon buttons */
.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-icon.btn-sm {
    width: 2rem;
    height: 2rem;
}

/* Round badges and pills */
.badge.rounded-pill {
    padding: 0.4rem 0.8rem;
    font-weight: 600;
}

/* Fix for icon buttons on small screens */
@media (max-width: 576px) {
    .navbar .btn,
    .navbar-nav .btn {
        border-radius: 50% !important;
    }
    
    .btn-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    .btn-icon.btn-sm {
        width: 2rem !important;
        height: 2rem !important;
    }
}

/* Fix for welcome banner buttons stacking */
@media (max-width: 576px) {
    .card.bg-gradient-primary .col-md-4 .d-flex {
        flex-direction: column;
        width: 100%;
    }
    
    .card.bg-gradient-primary .col-md-4 .btn {
        margin-right: 0 !important;
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Tables */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 700;
    color: #5a5c69;
}

.table td {
    vertical-align: middle;
    padding: 0.75rem;
}

/* Background Gradient */
.bg-gradient-primary {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Colors */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-purple {
    background-color: #6f42c1 !important;
}

/* Custom Cards */
.card {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.card-header {
    border-top-left-radius: 0.75rem !important;
    border-top-right-radius: 0.75rem !important;
    background-color: white;
    border-bottom: 1px solid #eaecf4;
    padding: 1rem 1.35rem;
}

.card-header h6 {
    font-weight: 700;
    color: #4e73df;
}

/* Fixes for Bootstrap modals */
.modal {
    transition: none; /* Transition'ları kaldırarak titreme sorununu gider */
}

.modal-dialog {
    transform: none !important; /* Bootstrap'ın transform özelliğini kaldırarak titreme sorununu gider */
}

.modal-backdrop.show {
    opacity: 0.5; /* Backdrop opasitesini düzelt */
}

/* Stok kodu hücresi stili */
.stock-code-cell {
    white-space: nowrap;
    min-width: 80px;
}

/* Warehouse name label styles */
.warehouse-name-label {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3em 0.65em;
    border-radius: 0.25rem;
    display: inline-block;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.warehouse-source-label {
    background-color: #f1f1f1;
    color: #666;
    border: 1px solid #ddd;
}

.warehouse-target-label {
    background-color: #e6f3f8;
    color: #36b9cc;
    border: 1px solid #c5e5ed;
}

/* Movement type label styles */
.movement-type-label {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
    display: inline-block;
}

.movement-type-in {
    background-color: #e6f8f1;
    color: #1cc88a;
    border: 1px solid #c3e6d7;
}

.movement-type-out {
    background-color: #fdeded;
    color: #e74a3b;
    border: 1px solid #f5c2c2;
}

.movement-type-transfer {
    background-color: #e6f3f8;
    color: #36b9cc;
    border: 1px solid #c5e5ed;
}

.stat-label {
    display: inline-block;
    padding: 0.30em 0.75em;
    font-size: 14px;
    font-weight: 600;
    border-radius: 0.5em;
    margin-right: 0.25em;
    margin-bottom: 0.15em;
    vertical-align: middle;
    background: #f5f5f5;
    color: #333;
    position: static;
}
.stat-label-blue {
    background: #e3f0ff;
    color: #2563eb;
}
.stat-label-green {
    background: #e6f7ec;
    color: #198754;
}
.stat-label-orange {
    background: #fff4e3;
    color: #ff9800;
}
.stat-label-purple {
    background: #f3e8ff;
    color: #8e24aa;
}
.stat-label-gray {
    background: #f1f1f1;
    color: #666;
}