/* ERP System Custom Premium Styling */
:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1e293b;
    --sidebar-color: #94a3b8;
    --sidebar-active-bg: #0ea5e9;
    --sidebar-active-color: #ffffff;
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --bg-body: #f8fafc;
    --card-border-radius: 12px;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: #334155;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Styling */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-color);
    z-index: 1040;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 1.25rem 1.5rem 0.5rem 1.5rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.sidebar-link:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
    color: var(--sidebar-active-color);
    background: rgba(14, 165, 233, 0.15);
    border-left-color: var(--sidebar-active-bg);
    font-weight: 600;
}

.sidebar-link i {
    font-size: 1.15rem;
}

/* Main Content Layout */
#main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

@media (max-width: 991.98px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.show {
        margin-left: 0;
    }
    #main-content {
        margin-left: 0;
    }
}

/* Top Navbar */
.top-navbar {
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}

.global-search-container {
    max-width: 420px;
    width: 100%;
    position: relative;
}

.global-search-container input {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding-left: 2.5rem;
    font-size: 0.875rem;
}

.global-search-container input:focus {
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.global-search-container i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* ERP Dashboard Cards */
.stat-card {
    background: #ffffff;
    border-radius: var(--card-border-radius);
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

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

.stat-icon.primary { background: rgba(2, 132, 199, 0.1); color: #0284c7; }
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-icon.danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.stat-icon.info { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }

/* Custom ERP Table Styling */
.card-table-header {
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    border-top-left-radius: var(--card-border-radius);
    border-top-right-radius: var(--card-border-radius);
}

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

.table-erp th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid #e2e8f0;
}

.table-erp td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    font-size: 0.875rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.table-erp tbody tr:hover {
    background-color: #f8fafc;
}

/* Badges */
.badge-erp {
    font-weight: 600;
    padding: 0.35em 0.75em;
    border-radius: 20px;
    font-size: 0.75rem;
}

.badge-erp-success { background: #dcfce7; color: #15803d; }
.badge-erp-warning { background: #fef3c7; color: #b45309; }
.badge-erp-danger { background: #fee2e2; color: #b91c1c; }
.badge-erp-info { background: #e0f2fe; color: #0369a1; }
.badge-erp-secondary { background: #f1f5f9; color: #475569; }

/* Action Buttons */
.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Printable styles */
@media print {
    #sidebar, .top-navbar, .no-print {
        display: none !important;
    }
    #main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
    }
}
