/* assets/css/style.css - Corporate & Clean WMS Theme */
:root {
    --primary-color: #2563eb;
    /* Corporate Blue */
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    /* Slate Gray */
    --success-color: #10b981;
    /* Emerald Success */
    --warning-color: #f59e0b;
    /* Amber Warning */
    --danger-color: #ef4444;
    /* Red Danger */
    --dark-color: #0f172a;
    /* Deep Navy */
    --sidebar-bg: #1e293b;
    /* Slate Dark Sidebar */
    --sidebar-active: #334155;
    --body-bg: #f8fafc;
    /* Very light slate bg */
    --card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --card-border: #e2e8f0;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--body-bg);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    line-height: 1.6;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1040;
    display: none;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: var(--sidebar-bg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar .brand {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.1);
    min-height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.sidebar .brand a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sidebar .brand img {
    max-width: 95%;
    /* Alana daha fazla yayılması için artırıldı */
    height: auto;
    max-height: 80px;
    /* Logo boyutu ciddi oranda büyütüldü */
    object-fit: contain;
}

.sidebar .nav-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
}

/* Custom Scrollbar for Sidebar */
.nav-list::-webkit-scrollbar {
    width: 4px;
}

.nav-list::-webkit-scrollbar-track {
    background: transparent;
}

.nav-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar a {
    color: #94a3b8;
    padding: 0.5rem 1.25rem;
    /* Padding daraltıldı */
    margin-bottom: 0.1rem;
    /* Satır arası mesafe azaltıldı */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    /* Daha kompakt font */
    font-weight: 500;
}

/* Dashboard Butonunu Merkezi ve Heybetli Ama Sıkı Tut */
.sidebar a[href="index.php"] {
    justify-content: center;
    margin-bottom: 0.4rem;
    padding: 0.6rem 1.25rem;
}

.sidebar a i {
    width: 22px;
    font-size: 1rem;
    margin-right: 10px;
    opacity: 0.6;
}

.sidebar a:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #f8fafc;
}

.sidebar a.active {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    font-weight: 600;
}

.sidebar a.active i {
    opacity: 1;
}

.sidebar .menu-header {
    padding: 1rem 1.25rem 0.3rem;
    /* Başlık boşlukları daraltıldı */
    color: #475569;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    letter-spacing: 0.1em;
}

/* User Profile Section in Sidebar Bottom */
.sidebar-footer {
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Main Content Wrapper */
.main-content {
    margin-left: 280px;
    width: calc(100% - 280px);
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .navbar-brand {
    font-weight: 700;
    color: var(--dark-color);
}

/* Page Header & Stats */
.content {
    padding: 2.5rem;
    max-width: 1600px;
}

/* Corporate Cards */
.card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--card-border);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.table-responsive {
    border-radius: 12px;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
}

.table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

/* Badges - Corporate Soft Style */
.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.75rem;
    display: inline-block !important;
    /* Ensure they render correctly */
}

/* GLOBAL FORCE: Override Bootstrap's white text on soft backgrounds */
[class*="badge-soft-"] {
    color: #1e293b !important;
    /* Force dark text regardless of Bootstrap/other rules */
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.badge.badge-soft-success {
    background-color: #dcfce7 !important;
    color: #166534 !important;
}

.badge.badge-soft-danger {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

.badge.badge-soft-warning {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}

.badge.badge-soft-info {
    background-color: #e0f2fe !important;
    color: #075985 !important;
}

.badge.badge-soft-secondary {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

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

    .sidebar.active {
        transform: translateX(0);
    }

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

    .content {
        padding: 1.5rem;
    }
}

/* Stat Cards for Dashboard */
.dash-card {
    border-left: 4px solid var(--primary-color);
}

.dash-card.card-success {
    border-left-color: var(--success-color);
}

.dash-card.card-warning {
    border-left-color: var(--warning-color);
}

.dash-card.card-danger {
    border-left-color: var(--danger-color);
}

.dash-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Forms */
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #475569;
}

.form-control,
.form-select {
    padding: 0.625rem 0.875rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.875rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

/* Dropdown Menu Premium Styling */
.dropdown-menu {
    border-radius: 16px !important;
    padding: 0.75rem !important;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.1), 0 10px 15px -10px rgba(0, 0, 0, 0.05) !important;
    min-width: 240px !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-item {
    border-radius: 10px !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8fafc !important;
    transform: translateX(4px);
}

.dropdown-item.text-danger:hover {
    background-color: #fff1f2 !important;
}

.dropdown-divider {
    border-top: 1px solid #f1f5f9 !important;
    margin: 0.75rem 0.5rem !important;
}